summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/policy
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-04-15 19:29:49 -0700
committerSelim Cinek <cinek@google.com>2015-04-16 11:58:41 -0700
commit31d9ef7a402b58b10758da1d71ff5e2181abe8a4 (patch)
tree133394ed0f225152dd5945cee02ef18f11944da3 /packages/SystemUI/src/com/android/systemui/statusbar/policy
parent2aab2fb76e0d3cbc8457aaaf92f49da2be6e14cc (diff)
downloadframeworks_base-31d9ef7a402b58b10758da1d71ff5e2181abe8a4.zip
frameworks_base-31d9ef7a402b58b10758da1d71ff5e2181abe8a4.tar.gz
frameworks_base-31d9ef7a402b58b10758da1d71ff5e2181abe8a4.tar.bz2
Fixed the behavior for HUNs with fullscreen intents
Now HUNs with full screen intents don't fire automatically when added and don't time out anymore when HUN'd Change-Id: Ic2d5033febe514760cbb4e6e028c3cea84d07cd8
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 920a0a1..dccf2e2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -464,15 +464,21 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
public void updateEntry() {
long currentTime = mClock.currentTimeMillis();
- postTime = Math.max(postTime, currentTime);
- long finishTime = postTime + mHeadsUpNotificationDecay;
- long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);
earliestRemovaltime = currentTime + mMinimumDisplayTime;
+ postTime = Math.max(postTime, currentTime);
removeAutoCancelCallbacks();
- mHandler.postDelayed(mRemoveHeadsUpRunnable, removeDelay);
+ if (canEntryDecay()) {
+ long finishTime = postTime + mHeadsUpNotificationDecay;
+ long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);
+ mHandler.postDelayed(mRemoveHeadsUpRunnable, removeDelay);
+ }
updateSortOrder(HeadsUpEntry.this);
}
+ private boolean canEntryDecay() {
+ return entry.notification.getNotification().fullScreenIntent == null;
+ }
+
@Override
public int compareTo(HeadsUpEntry o) {
return postTime < o.postTime ? 1