summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-06-14 16:07:45 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-14 16:07:45 -0700
commit68a808bc702f03536bd0cf3e2556127e364119d6 (patch)
tree031ca2015247958d2ba2e13eba00f57d2880c579 /packages/SystemUI
parent9add56546b1a5ddbf54f058f2ddb807a0ca02dff (diff)
parent590d515d912396a0c293d78529ac0dbc224400bf (diff)
downloadframeworks_base-68a808bc702f03536bd0cf3e2556127e364119d6.zip
frameworks_base-68a808bc702f03536bd0cf3e2556127e364119d6.tar.gz
frameworks_base-68a808bc702f03536bd0cf3e2556127e364119d6.tar.bz2
Merge "Show even fewer notifications in Setup." into jb-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 393ff0b..9c99653 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -820,6 +820,23 @@ public class PhoneStatusBar extends BaseStatusBar {
R.integer.config_show_search_delay);
}
+ // Q: What kinds of notifications should show during setup?
+ // A: Almost none! Only things coming from the system (package is "android") that also
+ // have special "kind" tags marking them as relevant for setup (see below).
+ private boolean showNotificationEvenIfUnprovisioned(StatusBarNotification sbn) {
+ if ("android".equals(sbn.pkg)) {
+ if (sbn.notification.kind != null) {
+ for (String aKind : sbn.notification.kind) {
+ // IME switcher, created by InputMethodManagerService
+ if ("android.system.imeswitcher".equals(aKind)) return true;
+ // OTA availability & errors, created by SystemUpdateService
+ if ("android.system.update".equals(aKind)) return true;
+ }
+ }
+ }
+ return false;
+ }
+
private void loadNotificationShade() {
if (mPile == null) return;
@@ -831,7 +848,7 @@ public class PhoneStatusBar extends BaseStatusBar {
// If the device hasn't been through Setup, we only show system notifications
for (int i=0; i<N; i++) {
Entry ent = mNotificationData.get(N-i-1);
- if (provisioned || "android".equals(ent.notification.pkg)) {
+ if (provisioned || showNotificationEvenIfUnprovisioned(ent.notification)) {
toShow.add(ent.row);
}
}
@@ -886,7 +903,7 @@ public class PhoneStatusBar extends BaseStatusBar {
for (int i=0; i<N; i++) {
Entry ent = mNotificationData.get(N-i-1);
if ((provisioned && ent.notification.score >= HIDE_ICONS_BELOW_SCORE)
- || "android".equals(ent.notification.pkg)) {
+ || showNotificationEvenIfUnprovisioned(ent.notification)) {
toShow.add(ent.icon);
}
}