Loading packages/SystemUI/res/values/ids.xml +3 −0 Original line number Diff line number Diff line Loading @@ -37,5 +37,8 @@ <item type="id" name="doze_saved_filter_tag"/> <item type="id" name="qs_icon_tag"/> <item type="id" name="scrim"/> <item type="id" name="notification_power"/> <item type="id" name="notification_screenshot"/> <item type="id" name="notification_hidden"/> </resources> packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +4 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { private static final boolean DEBUG = PowerUI.DEBUG; private static final String TAG_NOTIFICATION = "low_battery"; private static final int ID_NOTIFICATION = 100; private static final int SHOWING_NOTHING = 0; private static final int SHOWING_WARNING = 1; Loading Loading @@ -145,7 +144,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { showSaverNotification(); mShowing = SHOWING_SAVER; } else { mNoMan.cancelAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, UserHandle.ALL); mNoMan.cancelAsUser(TAG_NOTIFICATION, R.id.notification_power, UserHandle.ALL); mShowing = SHOWING_NOTHING; } } Loading @@ -166,7 +165,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (n.headsUpContentView != null) { n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, n, UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL); } private void showWarningNotification() { Loading Loading @@ -204,7 +203,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (n.headsUpContentView != null) { n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, n, UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL); } private void showSaverNotification() { Loading @@ -221,7 +220,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (hasSaverSettings()) { nb.setContentIntent(pendingActivity(mOpenSaverSettings)); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, nb.build(), UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, nb.build(), UserHandle.ALL); } private void addStopSaverAction(Notification.Builder nb) { Loading packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +2 −3 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi class GlobalScreenshot { private static final String TAG = "GlobalScreenshot"; private static final int SCREENSHOT_NOTIFICATION_ID = 789; private static final int SCREENSHOT_FLASH_TO_PEAK_DURATION = 130; private static final int SCREENSHOT_DROP_IN_DURATION = 430; private static final int SCREENSHOT_DROP_OUT_DELAY = 500; Loading Loading @@ -464,7 +463,7 @@ class GlobalScreenshot { mSaveInBgTask.cancel(false); } mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data, mNotificationManager, SCREENSHOT_NOTIFICATION_ID).execute(data); R.id.notification_screenshot).execute(data); } /** Loading Loading @@ -731,6 +730,6 @@ class GlobalScreenshot { new Notification.BigTextStyle(b) .bigText(r.getString(R.string.screenshot_failed_text)) .build(); nManager.notify(SCREENSHOT_NOTIFICATION_ID, n); nManager.notify(R.id.notification_screenshot, n); } } packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +2 −3 Original line number Diff line number Diff line Loading @@ -140,7 +140,6 @@ public abstract class BaseStatusBar extends SystemUI implements public static final int EXPANDED_LEAVE_ALONE = -10000; public static final int EXPANDED_FULL_OPEN = -10001; private static final int HIDDEN_NOTIFICATION_ID = 10000; private static final String BANNER_ACTION_CANCEL = "com.android.systemui.statusbar.banner_action_cancel"; private static final String BANNER_ACTION_SETUP = Loading Loading @@ -387,7 +386,7 @@ public abstract class BaseStatusBar extends SystemUI implements } else if (BANNER_ACTION_CANCEL.equals(action) || BANNER_ACTION_SETUP.equals(action)) { NotificationManager noMan = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); noMan.cancel(HIDDEN_NOTIFICATION_ID); noMan.cancel(R.id.notification_hidden); Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, 0); Loading Loading @@ -658,7 +657,7 @@ public abstract class BaseStatusBar extends SystemUI implements NotificationManager noMan = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); noMan.notify(HIDDEN_NOTIFICATION_ID, note.build()); noMan.notify(R.id.notification_hidden, note.build()); } } Loading Loading
packages/SystemUI/res/values/ids.xml +3 −0 Original line number Diff line number Diff line Loading @@ -37,5 +37,8 @@ <item type="id" name="doze_saved_filter_tag"/> <item type="id" name="qs_icon_tag"/> <item type="id" name="scrim"/> <item type="id" name="notification_power"/> <item type="id" name="notification_screenshot"/> <item type="id" name="notification_hidden"/> </resources>
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java +4 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { private static final boolean DEBUG = PowerUI.DEBUG; private static final String TAG_NOTIFICATION = "low_battery"; private static final int ID_NOTIFICATION = 100; private static final int SHOWING_NOTHING = 0; private static final int SHOWING_WARNING = 1; Loading Loading @@ -145,7 +144,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { showSaverNotification(); mShowing = SHOWING_SAVER; } else { mNoMan.cancelAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, UserHandle.ALL); mNoMan.cancelAsUser(TAG_NOTIFICATION, R.id.notification_power, UserHandle.ALL); mShowing = SHOWING_NOTHING; } } Loading @@ -166,7 +165,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (n.headsUpContentView != null) { n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, n, UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL); } private void showWarningNotification() { Loading Loading @@ -204,7 +203,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (n.headsUpContentView != null) { n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, n, UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL); } private void showSaverNotification() { Loading @@ -221,7 +220,7 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI { if (hasSaverSettings()) { nb.setContentIntent(pendingActivity(mOpenSaverSettings)); } mNoMan.notifyAsUser(TAG_NOTIFICATION, ID_NOTIFICATION, nb.build(), UserHandle.ALL); mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, nb.build(), UserHandle.ALL); } private void addStopSaverAction(Notification.Builder nb) { Loading
packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +2 −3 Original line number Diff line number Diff line Loading @@ -341,7 +341,6 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi class GlobalScreenshot { private static final String TAG = "GlobalScreenshot"; private static final int SCREENSHOT_NOTIFICATION_ID = 789; private static final int SCREENSHOT_FLASH_TO_PEAK_DURATION = 130; private static final int SCREENSHOT_DROP_IN_DURATION = 430; private static final int SCREENSHOT_DROP_OUT_DELAY = 500; Loading Loading @@ -464,7 +463,7 @@ class GlobalScreenshot { mSaveInBgTask.cancel(false); } mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data, mNotificationManager, SCREENSHOT_NOTIFICATION_ID).execute(data); R.id.notification_screenshot).execute(data); } /** Loading Loading @@ -731,6 +730,6 @@ class GlobalScreenshot { new Notification.BigTextStyle(b) .bigText(r.getString(R.string.screenshot_failed_text)) .build(); nManager.notify(SCREENSHOT_NOTIFICATION_ID, n); nManager.notify(R.id.notification_screenshot, n); } }
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +2 −3 Original line number Diff line number Diff line Loading @@ -140,7 +140,6 @@ public abstract class BaseStatusBar extends SystemUI implements public static final int EXPANDED_LEAVE_ALONE = -10000; public static final int EXPANDED_FULL_OPEN = -10001; private static final int HIDDEN_NOTIFICATION_ID = 10000; private static final String BANNER_ACTION_CANCEL = "com.android.systemui.statusbar.banner_action_cancel"; private static final String BANNER_ACTION_SETUP = Loading Loading @@ -387,7 +386,7 @@ public abstract class BaseStatusBar extends SystemUI implements } else if (BANNER_ACTION_CANCEL.equals(action) || BANNER_ACTION_SETUP.equals(action)) { NotificationManager noMan = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); noMan.cancel(HIDDEN_NOTIFICATION_ID); noMan.cancel(R.id.notification_hidden); Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, 0); Loading Loading @@ -658,7 +657,7 @@ public abstract class BaseStatusBar extends SystemUI implements NotificationManager noMan = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); noMan.notify(HIDDEN_NOTIFICATION_ID, note.build()); noMan.notify(R.id.notification_hidden, note.build()); } } Loading