From 90f8035ea58cd3beace27c3549dcdb3f3d6b8c19 Mon Sep 17 00:00:00 2001 From: Dan Sandler Date: Mon, 9 Jun 2014 13:20:24 -0400 Subject: [PATCH] Hide aspirational notifications UI. Once those features are implemented we'll wire the boxes up. Bug: 15080030 Change-Id: Ic0f0e6f411df2ae4733bce8e5328fb2c5b16ddaf --- .../notification/AppNotificationSettings.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java index 91035732143..68695f2062b 100644 --- a/src/com/android/settings/notification/AppNotificationSettings.java +++ b/src/com/android/settings/notification/AppNotificationSettings.java @@ -65,6 +65,17 @@ public class AppNotificationSettings extends ListFragment { private static final String TAG = "AppNotificationSettings"; private static final boolean DEBUG = true; + /** + * Show a checkbox in the per-app notification control dialog to allow the user + * to promote this app's notifications to higher priority. + */ + private static final boolean ENABLE_APP_NOTIFICATION_PRIORITY_OPTION = false; + /** + * Show a checkbox in the per-app notification control dialog to allow the user to + * selectively redact this app's notifications on the lockscreen. + */ + private static final boolean ENABLE_APP_NOTIFICATION_PRIVACY_OPTION = false; + private static final String SECTION_BEFORE_A = "*"; private static final String SECTION_AFTER_Z = "**"; private static final Intent APP_NOTIFICATION_PREFS_CATEGORY_INTENT @@ -187,6 +198,14 @@ public class AppNotificationSettings extends ListFragment { final CheckBox priBox = (CheckBox) layout.findViewById(android.R.id.button2); final CheckBox senBox = (CheckBox) layout.findViewById(android.R.id.button3); + if (!ENABLE_APP_NOTIFICATION_PRIORITY_OPTION) { + priBox.setVisibility(View.GONE); + } + + if (!ENABLE_APP_NOTIFICATION_PRIVACY_OPTION) { + senBox.setVisibility(View.GONE); + } + showBox.setChecked(!row.banned); final OnCheckedChangeListener showListener = new OnCheckedChangeListener() { @Override