diff options
author | Daniel Sandler <dsandler@android.com> | 2012-04-11 12:33:16 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-04-19 11:39:49 -0400 |
commit | 0da673f02e542c644c300568807c80e196296860 (patch) | |
tree | 3792b57fe26674eec61df907a3da4eda4852ede1 /packages | |
parent | f7a1956b06faeb6025fdea331f81d66edda58b3c (diff) | |
download | frameworks_base-0da673f02e542c644c300568807c80e196296860.zip frameworks_base-0da673f02e542c644c300568807c80e196296860.tar.gz frameworks_base-0da673f02e542c644c300568807c80e196296860.tar.bz2 |
Notifications may now be disabled on a per-package basis.
When a package's ability to post notifications is disabled,
all outstanding notifications from that package are
immediately canceled, and the score of any future
notification from that package is set so low that the
notification manager won't even send it to the status bar.
No UI for this yet, but you can try it out:
adb shell service call notification 8 s16 $PKG i32 (1|0)
Bug: 5547401
Change-Id: Ieccac5746b40f60debd902a45d1dedbc91dcdc89
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 29 |
1 files changed, 0 insertions, 29 deletions
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 b7becf3..da98c80 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -218,11 +218,6 @@ public class PhoneStatusBar extends BaseStatusBar { private int mNavigationIconHints = 0; - // TODO(dsandler): codify this stuff in NotificationManager's header somewhere - private int mDisplayMinScore = Notification.PRIORITY_LOW * 10; - private int mIntruderMinScore = Notification.PRIORITY_HIGH * 10; - private int mIntruderInImmersiveMinScore = Notification.PRIORITY_HIGH * 10 + 5; - private class ExpandedDialog extends Dialog { ExpandedDialog(Context context) { super(context, com.android.internal.R.style.Theme_Translucent_NoTitleBar); @@ -2132,30 +2127,6 @@ public class PhoneStatusBar extends BaseStatusBar { vib.vibrate(250); } - public int getScoreThreshold() { - return mDisplayMinScore; - } - - public void setScoreThreshold(int score) { - // XXX HAX - if (mDisplayMinScore != score) { - this.mDisplayMinScore = score; - applyScoreThreshold(); - } - } - - private void applyScoreThreshold() { - int N = mNotificationData.size(); - for (int i=0; i<N; i++) { - NotificationData.Entry entry = mNotificationData.get(i); - int vis = (entry.notification.score < mDisplayMinScore) - ? View.GONE - : View.VISIBLE; - entry.row.setVisibility(vis); - entry.icon.setVisibility(vis); - } - } - Runnable mStartTracing = new Runnable() { public void run() { vibrate(); |