summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-10-20 16:07:12 -0700
committerSelim Cinek <cinek@google.com>2015-10-20 23:17:59 +0000
commit2ae7107d0e9cde3e88c7313cf4dbcebbd171597e (patch)
tree454dfcd9ccd58785aa599d04f768e1db2f67c734 /packages
parent3554d62ca02bf6bc7777d1b22699876ec388fe6c (diff)
downloadframeworks_base-2ae7107d0e9cde3e88c7313cf4dbcebbd171597e.zip
frameworks_base-2ae7107d0e9cde3e88c7313cf4dbcebbd171597e.tar.gz
frameworks_base-2ae7107d0e9cde3e88c7313cf4dbcebbd171597e.tar.bz2
Changing the ordering for heads up notifications
In the new ranking, notifications with fullscreen intents always take priority over those without, such that when you get a call and a message in succession, you would always see the call on top and are able to pick it up. Bug: 22778349 Change-Id: Ia9aaf009998fc9493f513dc71f2649d38ccf7a79
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java7
1 files changed, 7 insertions, 0 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 299f20e..4a95d3a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -582,6 +582,13 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
@Override
public int compareTo(HeadsUpEntry o) {
+ boolean selfFullscreen = hasFullScreenIntent(entry);
+ boolean otherFullscreen = hasFullScreenIntent(o.entry);
+ if (selfFullscreen && !otherFullscreen) {
+ return -1;
+ } else if (!selfFullscreen && otherFullscreen) {
+ return 1;
+ }
return postTime < o.postTime ? 1
: postTime == o.postTime ? entry.key.compareTo(o.entry.key)
: -1;