Merge change 8338 into donut
* changes: Have the notification service only have notifications diabled until setup wizard has been run.
This commit is contained in:
@@ -90,7 +90,7 @@ class NotificationManagerService extends INotificationManager.Stub
|
|||||||
private NotificationRecord mSoundNotification;
|
private NotificationRecord mSoundNotification;
|
||||||
private AsyncPlayer mSound;
|
private AsyncPlayer mSound;
|
||||||
private boolean mSystemReady;
|
private boolean mSystemReady;
|
||||||
private int mDisabledNotifications = StatusBarManager.DISABLE_NOTIFICATION_ALERTS;
|
private int mDisabledNotifications;
|
||||||
|
|
||||||
private NotificationRecord mVibrateNotification;
|
private NotificationRecord mVibrateNotification;
|
||||||
private Vibrator mVibrator = new Vibrator();
|
private Vibrator mVibrator = new Vibrator();
|
||||||
@@ -368,6 +368,15 @@ class NotificationManagerService extends INotificationManager.Stub
|
|||||||
mStatusBarService = statusBar;
|
mStatusBarService = statusBar;
|
||||||
statusBar.setNotificationCallbacks(mNotificationCallbacks);
|
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
|
// register for battery changed notifications
|
||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||||
@@ -1049,6 +1058,8 @@ class NotificationManagerService extends INotificationManager.Stub
|
|||||||
pw.println(" mSoundNotification=" + mSoundNotification);
|
pw.println(" mSoundNotification=" + mSoundNotification);
|
||||||
pw.println(" mSound=" + mSound);
|
pw.println(" mSound=" + mSound);
|
||||||
pw.println(" mVibrateNotification=" + mVibrateNotification);
|
pw.println(" mVibrateNotification=" + mVibrateNotification);
|
||||||
|
pw.println(" mDisabledNotifications=0x" + Integer.toHexString(mDisabledNotifications));
|
||||||
|
pw.println(" mSystemReady=" + mSystemReady);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user