Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +19 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); } } Loading Loading @@ -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); } } Loading services/java/com/android/server/InputMethodManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -586,6 +586,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.defaults = 0; // please be quiet mImeSwitcherNotification.sound = null; mImeSwitcherNotification.vibrate = null; // Tag this notification specially so SystemUI knows it's important mImeSwitcherNotification.kind = new String[] { "android.system.imeswitcher" }; Intent intent = new Intent(Settings.ACTION_SHOW_INPUT_METHOD_PICKER); mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +19 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); } } Loading Loading @@ -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); } } Loading
services/java/com/android/server/InputMethodManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -586,6 +586,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mImeSwitcherNotification.defaults = 0; // please be quiet mImeSwitcherNotification.sound = null; mImeSwitcherNotification.vibrate = null; // Tag this notification specially so SystemUI knows it's important mImeSwitcherNotification.kind = new String[] { "android.system.imeswitcher" }; Intent intent = new Intent(Settings.ACTION_SHOW_INPUT_METHOD_PICKER); mImeSwitchPendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); Loading