summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/power
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-01-16 16:16:43 -0500
committerChris Wren <cwren@android.com>2015-01-16 16:19:32 -0500
commitd8775100b28fd1c0cc7380226a8b2c7c312e28f7 (patch)
tree8bce9691a71b1440c98463941a98dc2bc51a9970 /packages/SystemUI/src/com/android/systemui/power
parentdbf22ccd92dc95e7c93c0485be4bcfb5c966578a (diff)
downloadframeworks_base-d8775100b28fd1c0cc7380226a8b2c7c312e28f7.zip
frameworks_base-d8775100b28fd1c0cc7380226a8b2c7c312e28f7.tar.gz
frameworks_base-d8775100b28fd1c0cc7380226a8b2c7c312e28f7.tar.bz2
Standardize notification IDs in the sysui package.
Use the resource system to assign IDs for notifications, so that we know there will be no collisions. Bug: 10671709 Change-Id: I403e89f6ec953f6e2e63520b86e2cd464ebce6b3
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/power')
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 4391bfc..63dd17f 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -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;
@@ -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;
}
}
@@ -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() {
@@ -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() {
@@ -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) {