Bug 1279301 Moved notification classes to notification folder, refactored; r?jonalmeida draft fx-team
authorBroderick Stadden <bstadden@gmail.com>
Mon, 25 Jul 2016 21:31:02 -1000
branchfx-team
changeset 393022 5a4600eb9fbaf603dd28c31505b826a1cd00e3ca
parent 393014 590c1dedb29c7741ccb289d88e99de22e0e7939d
child 393024 e112a8ab39bd64c14ac79c4975ad23d565ee34d1
child 724591 db627c891bb6e832ae4ae2f31d0c85e8d8a600d8
push id24179
push userbmo:bstadden@gmail.com
push dateTue, 26 Jul 2016 18:48:31 +0000
reviewersjonalmeida
bugs1279301
milestone50.0a1
Bug 1279301 Moved notification classes to notification folder, refactored; r?jonalmeida MozReview-Commit-ID: FJpx0ZKzkiT
mobile/android/base/java/org/mozilla/gecko/AppNotificationClient.java
mobile/android/base/java/org/mozilla/gecko/NotificationClient.java
mobile/android/base/java/org/mozilla/gecko/NotificationHandler.java
mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java
mobile/android/base/java/org/mozilla/gecko/NotificationReceiver.java
mobile/android/base/java/org/mozilla/gecko/NotificationService.java
mobile/android/base/java/org/mozilla/gecko/ServiceNotificationClient.java
mobile/android/base/java/org/mozilla/gecko/notifications/AppNotificationClient.java
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHandler.java
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
mobile/android/base/java/org/mozilla/gecko/notifications/NotificationService.java
mobile/android/base/java/org/mozilla/gecko/notifications/ServiceNotificationClient.java
rename from mobile/android/base/java/org/mozilla/gecko/AppNotificationClient.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/AppNotificationClient.java
--- a/mobile/android/base/java/org/mozilla/gecko/AppNotificationClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/AppNotificationClient.java
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import android.content.Context;
 
 /**
  * Client for posting notifications in the application.
  */
 public class AppNotificationClient extends NotificationClient {
     private final Context mContext;
rename from mobile/android/base/java/org/mozilla/gecko/NotificationClient.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
--- a/mobile/android/base/java/org/mozilla/gecko/NotificationClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.text.TextUtils;
 import android.util.Log;
 
 import java.util.LinkedList;
 import java.util.concurrent.ConcurrentHashMap;
rename from mobile/android/base/java/org/mozilla/gecko/NotificationHandler.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHandler.java
--- a/mobile/android/base/java/org/mozilla/gecko/NotificationHandler.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHandler.java
@@ -1,22 +1,24 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import android.graphics.Bitmap;
 
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.Context;
 import android.support.v4.app.NotificationCompat;
 import android.support.v4.app.NotificationManagerCompat;
+
+import org.mozilla.gecko.R;
 import org.mozilla.gecko.gfx.BitmapUtils;
 
 import java.util.concurrent.ConcurrentHashMap;
 
 public class NotificationHandler {
     private static String LOGTAG = "GeckoNotifHandler";
     private final ConcurrentHashMap<Integer, Notification>
             mNotifications = new ConcurrentHashMap<Integer, Notification>();
rename from mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
--- a/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
@@ -1,21 +1,25 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import java.util.HashMap;
 import java.util.Iterator;
 
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
+import org.mozilla.gecko.AppConstants;
+import org.mozilla.gecko.EventDispatcher;
+import org.mozilla.gecko.GeckoAppShell;
+import org.mozilla.gecko.R;
 import org.mozilla.gecko.gfx.BitmapUtils;
 import org.mozilla.gecko.mozglue.SafeIntent;
 import org.mozilla.gecko.util.GeckoEventListener;
 
 import android.app.PendingIntent;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
rename from mobile/android/base/java/org/mozilla/gecko/NotificationReceiver.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
--- a/mobile/android/base/java/org/mozilla/gecko/NotificationReceiver.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
@@ -1,15 +1,16 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
+import org.mozilla.gecko.GeckoThread;
 import org.mozilla.gecko.mozglue.SafeIntent;
 
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 import android.util.Log;
rename from mobile/android/base/java/org/mozilla/gecko/NotificationService.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/NotificationService.java
--- a/mobile/android/base/java/org/mozilla/gecko/NotificationService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationService.java
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import android.app.Notification;
 import android.app.Service;
 import android.content.Intent;
 import android.os.Binder;
 import android.os.IBinder;
 
 public class NotificationService extends Service {
rename from mobile/android/base/java/org/mozilla/gecko/ServiceNotificationClient.java
rename to mobile/android/base/java/org/mozilla/gecko/notifications/ServiceNotificationClient.java
--- a/mobile/android/base/java/org/mozilla/gecko/ServiceNotificationClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/ServiceNotificationClient.java
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.notifications;
 
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.ServiceConnection;
 import android.os.IBinder;
 import android.util.Log;