Bug 1279301 Moved notification classes to notification folder, refactored; r?jonalmeida
MozReview-Commit-ID: FJpx0ZKzkiT
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;