diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-07-31 17:38:20 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-07-31 17:38:20 -0700 |
commit | 5c1207be90fdf296c1b83034b7c68915e1749284 (patch) | |
tree | e5679f6183458d8179821d5615dabafcb959704d /services/java/com/android/server/NotificationManagerService.java | |
parent | a8675f67e33bc7337d148358783b0fd138b501ff (diff) | |
download | frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.zip frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.gz frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.bz2 |
donut snapshot
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
-rw-r--r-- | services/java/com/android/server/NotificationManagerService.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 38fb7c9..aac7124 100644 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -90,7 +90,7 @@ class NotificationManagerService extends INotificationManager.Stub private NotificationRecord mSoundNotification; private AsyncPlayer mSound; private boolean mSystemReady; - private int mDisabledNotifications = StatusBarManager.DISABLE_NOTIFICATION_ALERTS; + private int mDisabledNotifications; private NotificationRecord mVibrateNotification; private Vibrator mVibrator = new Vibrator(); @@ -368,6 +368,15 @@ class NotificationManagerService extends INotificationManager.Stub mStatusBarService = statusBar; statusBar.setNotificationCallbacks(mNotificationCallbacks); + // Don't start allowing notifications until the setup wizard has run once. + // After that, including subsequent boots, init with notifications turned on. + // This works on the first boot because the setup wizard will toggle this + // flag at least once and we'll go back to 0 after that. + if (0 == Settings.Secure.getInt(mContext.getContentResolver(), + Settings.Secure.DEVICE_PROVISIONED, 0)) { + mDisabledNotifications = StatusBarManager.DISABLE_NOTIFICATION_ALERTS; + } + // register for battery changed notifications IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_BATTERY_CHANGED); @@ -1049,6 +1058,8 @@ class NotificationManagerService extends INotificationManager.Stub pw.println(" mSoundNotification=" + mSoundNotification); pw.println(" mSound=" + mSound); pw.println(" mVibrateNotification=" + mVibrateNotification); + pw.println(" mDisabledNotifications=0x" + Integer.toHexString(mDisabledNotifications)); + pw.println(" mSystemReady=" + mSystemReady); } } } |