summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-05-21 22:27:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-21 22:27:29 +0000
commite660694c6906ff997ff03eb312cfc8f15279d6d8 (patch)
tree7ac91bec137f2572dc50bdfceb1eb6b026d92874 /packages
parent304bbd287c7a18f66f18daaed0d0aae78199bdd9 (diff)
parent014ad591c22246955d119042ca95d83c3bbd7775 (diff)
downloadframeworks_base-e660694c6906ff997ff03eb312cfc8f15279d6d8.zip
frameworks_base-e660694c6906ff997ff03eb312cfc8f15279d6d8.tar.gz
frameworks_base-e660694c6906ff997ff03eb312cfc8f15279d6d8.tar.bz2
Merge "Display intercepted notifications if configured."
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
index 9c39002..8440b9f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.os.Binder;
import android.os.IBinder;
import android.os.Process;
+import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.util.ArrayMap;
import android.view.View;
@@ -59,6 +60,7 @@ public class InterceptedNotifications {
public boolean tryIntercept(IBinder key, StatusBarNotification notification) {
if (!notification.getNotification().extras.getBoolean(EXTRA_INTERCEPT)) return false;
+ if (shouldDisplayIntercepted()) return false;
mIntercepted.put(key, notification);
updateSyntheticNotification();
return true;
@@ -80,6 +82,11 @@ public class InterceptedNotifications {
}
}
+ private boolean shouldDisplayIntercepted() {
+ return Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, 0) != 0;
+ }
+
private void updateSyntheticNotification() {
if (mIntercepted.isEmpty()) {
if (mSynKey != null) {