summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Reynolds <juliacr@google.com> 2016-01-26 17:00:22 -0500
committer Julia Reynolds <juliacr@google.com> 2016-01-26 17:00:22 -0500
commit0971cb076d41f0e57a235588a1dde9ccdfabf0ca (patch)
treef4d25d8ae2db7736525ea5d198eae1c84af95186
parent92d456e9a62d7dadb3e21f481f7453bd82b1aa23 (diff)
Visual interruptions: stop more full screen intents.
The user options for 'no screen interruptions' needs to stop peeks and full screen intents when the screen is on. Bug: 25423508 Change-Id: I49b1c40552c3506fae259364a4d5e49168c8de36
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java10
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 2592486cde7c..ddffb5eec412 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -186,7 +186,7 @@ public abstract class BaseStatusBar extends SystemUI implements
protected DevicePolicyManager mDevicePolicyManager;
protected IDreamManager mDreamManager;
- PowerManager mPowerManager;
+ protected PowerManager mPowerManager;
protected StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
// public mode, private notifications, etc
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 e2a61849c9c4..d3aa8ed8df9c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1256,7 +1256,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
if (!isHeadsUped && notification.getNotification().fullScreenIntent != null) {
- if (mNotificationData.shouldSuppressScreenOn(notification.getKey())) {
+ if (shouldSupressFullScreenIntent(notification.getKey())) {
if (DEBUG) {
Log.d(TAG, "No Fullscreen intent: suppressed by DND: " + notification.getKey());
}
@@ -1283,6 +1283,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
setAreThereNotifications();
}
+ private boolean shouldSupressFullScreenIntent(String key) {
+ if (mPowerManager.isInteractive()) {
+ return mNotificationData.shouldSuppressPeek(key);
+ } else {
+ return mNotificationData.shouldSuppressScreenOn(key);
+ }
+ }
+
@Override
protected void updateNotificationRanking(RankingMap ranking) {
mNotificationData.updateRanking(ranking);