summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java7
-rw-r--r--services/core/java/com/android/server/pm/UserManagerService.java4
2 files changed, 5 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index bd4442e696f3..ba970eae485e 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -1195,7 +1195,6 @@ public class NotificationManagerService extends SystemService {
getContext().registerReceiver(mIntentReceiver, sdFilter);
mSettingsObserver = new SettingsObserver(mHandler);
- mSettingsObserver.observe();
// spin up NotificationScorers
String[] notificationScorerNames = resources.getStringArray(
@@ -1250,8 +1249,10 @@ public class NotificationManagerService extends SystemService {
// Grab our optional AudioService
mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
- // make sure our listener services are properly bound
- rebindListenerServices();
+ } else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
+ // This observer will force an update when observe is called, causing us to
+ // bind to listener services.
+ mSettingsObserver.observe();
}
}
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index c33134a24d19..557b6a325a5e 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -233,9 +233,7 @@ public class UserManagerService extends IUserManager.Stub {
}
void systemReady() {
- final Context context = ActivityThread.systemMain().getSystemContext();
- mUserPackageMonitor.register(context,
- null, UserHandle.ALL, false);
+ mUserPackageMonitor.register(mContext, null, UserHandle.ALL, false);
userForeground(UserHandle.USER_OWNER);
}