Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +43 −15 Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ public abstract class BaseStatusBar extends SystemUI implements // for heads up notifications protected HeadsUpNotificationView mHeadsUpNotificationView; protected int mHeadsUpNotificationDecay; protected long mInterruptingNotificationTime; // used to notify status bar for suppressing notification LED protected boolean mPanelSlightlyVisible; Loading Loading @@ -1413,6 +1412,9 @@ public abstract class BaseStatusBar extends SystemUI implements && !TextUtils.equals(notification.getNotification().tickerText, oldEntry.notification.getNotification().tickerText); final boolean shouldInterrupt = shouldInterrupt(notification); final boolean alertAgain = alertAgain(oldEntry); boolean updateSuccessful = false; if (contentsUnchanged && bigContentsUnchanged && headsUpContentsUnchanged && publicUnchanged) { if (DEBUG) Log.d(TAG, "reusing notification for key: " + key); Loading @@ -1432,8 +1434,6 @@ public abstract class BaseStatusBar extends SystemUI implements } } final boolean shouldInterrupt = shouldInterrupt(notification); final boolean alertAgain = alertAgain(oldEntry); if (wasHeadsUp) { if (shouldInterrupt) { updateHeadsUpViews(oldEntry, notification); Loading @@ -1455,16 +1455,42 @@ public abstract class BaseStatusBar extends SystemUI implements } mNotificationData.updateRanking(ranking); updateNotifications(); updateSuccessful = true; } catch (RuntimeException e) { // It failed to add cleanly. Log, and remove the view from the panel. Log.w(TAG, "Couldn't reapply views for package " + contentView.getPackage(), e); removeNotificationViews(key, ranking); addNotificationViews(notification, ranking); } } else { } if (!updateSuccessful) { if (DEBUG) Log.d(TAG, "not reusing notification for key: " + key); if (DEBUG) Log.d(TAG, "contents was " + (contentsUnchanged ? "unchanged" : "changed")); if (wasHeadsUp) { if (shouldInterrupt) { if (DEBUG) Log.d(TAG, "rebuilding heads up for key: " + key); Entry newEntry = new Entry(notification, null); ViewGroup holder = mHeadsUpNotificationView.getHolder(); if (inflateViewsForHeadsUp(newEntry, holder)) { mHeadsUpNotificationView.showNotification(newEntry); if (alertAgain) { resetHeadsUpDecayTimer(); } } else { Log.w(TAG, "Couldn't create new updated headsup for package " + contentView.getPackage()); } } else { if (DEBUG) Log.d(TAG, "releasing heads up for key: " + key); oldEntry.notification = notification; mHeadsUpNotificationView.releaseAndClose(); return; } } else { if (shouldInterrupt && alertAgain) { if (DEBUG) Log.d(TAG, "reposting to invoke heads up for key: " + key); removeNotificationViews(key, ranking); addNotificationInternal(notification, ranking); //this will pop the headsup } else { if (DEBUG) Log.d(TAG, "rebuilding update in place for key: " + key); removeNotificationViews(key, ranking); addNotificationViews(notification, ranking); final NotificationData.Entry newEntry = mNotificationData.findByKey(key); Loading @@ -1475,6 +1501,8 @@ public abstract class BaseStatusBar extends SystemUI implements newEntry.row.notifyHeightChanged(); } } } } // Update the veto button accordingly (and as a result, whether this row is // swipe-dismissable) Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −2 Original line number Diff line number Diff line Loading @@ -1081,8 +1081,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, Entry interruptionCandidate = new Entry(notification, null); ViewGroup holder = mHeadsUpNotificationView.getHolder(); if (inflateViewsForHeadsUp(interruptionCandidate, holder)) { mInterruptingNotificationTime = System.currentTimeMillis(); // 1. Populate mHeadsUpNotificationView mHeadsUpNotificationView.showNotification(interruptionCandidate); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,8 +78,10 @@ public class HeadsUpNotificationView extends FrameLayout implements SwipeHelper. } public boolean showNotification(NotificationData.Entry headsUp) { if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) { // bump any previous heads up back to the shade release(); } mHeadsUp = headsUp; if (mContentHolder != null) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +43 −15 Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ public abstract class BaseStatusBar extends SystemUI implements // for heads up notifications protected HeadsUpNotificationView mHeadsUpNotificationView; protected int mHeadsUpNotificationDecay; protected long mInterruptingNotificationTime; // used to notify status bar for suppressing notification LED protected boolean mPanelSlightlyVisible; Loading Loading @@ -1413,6 +1412,9 @@ public abstract class BaseStatusBar extends SystemUI implements && !TextUtils.equals(notification.getNotification().tickerText, oldEntry.notification.getNotification().tickerText); final boolean shouldInterrupt = shouldInterrupt(notification); final boolean alertAgain = alertAgain(oldEntry); boolean updateSuccessful = false; if (contentsUnchanged && bigContentsUnchanged && headsUpContentsUnchanged && publicUnchanged) { if (DEBUG) Log.d(TAG, "reusing notification for key: " + key); Loading @@ -1432,8 +1434,6 @@ public abstract class BaseStatusBar extends SystemUI implements } } final boolean shouldInterrupt = shouldInterrupt(notification); final boolean alertAgain = alertAgain(oldEntry); if (wasHeadsUp) { if (shouldInterrupt) { updateHeadsUpViews(oldEntry, notification); Loading @@ -1455,16 +1455,42 @@ public abstract class BaseStatusBar extends SystemUI implements } mNotificationData.updateRanking(ranking); updateNotifications(); updateSuccessful = true; } catch (RuntimeException e) { // It failed to add cleanly. Log, and remove the view from the panel. Log.w(TAG, "Couldn't reapply views for package " + contentView.getPackage(), e); removeNotificationViews(key, ranking); addNotificationViews(notification, ranking); } } else { } if (!updateSuccessful) { if (DEBUG) Log.d(TAG, "not reusing notification for key: " + key); if (DEBUG) Log.d(TAG, "contents was " + (contentsUnchanged ? "unchanged" : "changed")); if (wasHeadsUp) { if (shouldInterrupt) { if (DEBUG) Log.d(TAG, "rebuilding heads up for key: " + key); Entry newEntry = new Entry(notification, null); ViewGroup holder = mHeadsUpNotificationView.getHolder(); if (inflateViewsForHeadsUp(newEntry, holder)) { mHeadsUpNotificationView.showNotification(newEntry); if (alertAgain) { resetHeadsUpDecayTimer(); } } else { Log.w(TAG, "Couldn't create new updated headsup for package " + contentView.getPackage()); } } else { if (DEBUG) Log.d(TAG, "releasing heads up for key: " + key); oldEntry.notification = notification; mHeadsUpNotificationView.releaseAndClose(); return; } } else { if (shouldInterrupt && alertAgain) { if (DEBUG) Log.d(TAG, "reposting to invoke heads up for key: " + key); removeNotificationViews(key, ranking); addNotificationInternal(notification, ranking); //this will pop the headsup } else { if (DEBUG) Log.d(TAG, "rebuilding update in place for key: " + key); removeNotificationViews(key, ranking); addNotificationViews(notification, ranking); final NotificationData.Entry newEntry = mNotificationData.findByKey(key); Loading @@ -1475,6 +1501,8 @@ public abstract class BaseStatusBar extends SystemUI implements newEntry.row.notifyHeightChanged(); } } } } // Update the veto button accordingly (and as a result, whether this row is // swipe-dismissable) Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +0 −2 Original line number Diff line number Diff line Loading @@ -1081,8 +1081,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, Entry interruptionCandidate = new Entry(notification, null); ViewGroup holder = mHeadsUpNotificationView.getHolder(); if (inflateViewsForHeadsUp(interruptionCandidate, holder)) { mInterruptingNotificationTime = System.currentTimeMillis(); // 1. Populate mHeadsUpNotificationView mHeadsUpNotificationView.showNotification(interruptionCandidate); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java +4 −2 Original line number Diff line number Diff line Loading @@ -78,8 +78,10 @@ public class HeadsUpNotificationView extends FrameLayout implements SwipeHelper. } public boolean showNotification(NotificationData.Entry headsUp) { if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) { // bump any previous heads up back to the shade release(); } mHeadsUp = headsUp; if (mContentHolder != null) { Loading