mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934345 - Move NotificationHelper initialization to GeckoApp since it was being initialized twice when more than one process were active. r=wesj
This commit is contained in:
parent
4050ca433c
commit
20c1ae1d0a
@ -1293,6 +1293,7 @@ abstract public class GeckoApp
|
||||
});
|
||||
|
||||
GeckoAppShell.setNotificationClient(makeNotificationClient());
|
||||
NotificationHelper.init(getApplicationContext());
|
||||
}
|
||||
|
||||
protected void initializeChrome() {
|
||||
|
@ -98,7 +98,6 @@ public class GeckoApplication extends Application {
|
||||
public void onCreate() {
|
||||
HardwareUtils.init(getApplicationContext());
|
||||
Clipboard.init(getApplicationContext());
|
||||
NotificationHelper.init(getApplicationContext());
|
||||
GeckoLoader.loadMozGlue();
|
||||
super.onCreate();
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public final class NotificationHelper implements GeckoEventListener {
|
||||
public static final String NOTIFICATION_ID = "NotificationHelper_ID";
|
||||
private static final String LOGTAG = "GeckoNotificationManager";
|
||||
private static final String HELPER_NOTIFICATION = "helperNotif";
|
||||
private static final String HELPER_BROADCAST_ACTION = "helperBroadcastAction";
|
||||
private static final String HELPER_BROADCAST_ACTION = AppConstants.ANDROID_PACKAGE_NAME + ".helperBroadcastAction";
|
||||
|
||||
// Attributes mandatory to be used while sending a notification from js.
|
||||
private static final String TITLE_ATTR = "title";
|
||||
@ -71,6 +71,7 @@ public final class NotificationHelper implements GeckoEventListener {
|
||||
public static void init(Context context) {
|
||||
if (mInstance != null) {
|
||||
Log.w(LOGTAG, "NotificationHelper.init() called twice!");
|
||||
return;
|
||||
}
|
||||
mInstance = new NotificationHelper();
|
||||
mContext = context;
|
||||
|
Loading…
Reference in New Issue
Block a user