Remove ZEN notification visibility settings

Bug: 15286335
Change-Id: I927948458cfa4cddb8ebffda2f4c81fa003f8004
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7afc8c3..b4a6a44 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5193,15 +5193,6 @@
          [CHAR LIMIT=50] -->
     <string name="lock_screen_notifications_summary_disable">Don\'t show notifications at all</string>
 
-    <!-- Sound & notifications > Showing notifications: Title for the option managing notification display in zen mode. [CHAR LIMIT=30] -->
-    <string name="zen_mode_notifications_title">When do not disturb is on</string>
-
-    <!-- Sound & notifications > Showing notifications: Value for zen mode notifications: notifications will be suppressed in zen mode [CHAR LIMIT=50] -->
-    <string name="zen_mode_notifications_summary_hide">Hide new notifications from the list</string>
-
-    <!-- Sound & notifications > Showing notifications: Value for zen mode notifications: notifications will be displayed in zen mode [CHAR LIMIT=50] -->
-    <string name="zen_mode_notifications_summary_show">Show all notifications in the list</string>
-
     <!-- Sound & notifications > Showing notifications: Title for the option managing notifications per application. [CHAR LIMIT=30] -->
     <string name="app_notifications_title">App notifications</string>
 
diff --git a/res/xml/notification_display_settings.xml b/res/xml/notification_display_settings.xml
index d5cade1..2dbe4b3 100644
--- a/res/xml/notification_display_settings.xml
+++ b/res/xml/notification_display_settings.xml
@@ -33,12 +33,6 @@
             android:title="@string/lock_screen_notifications_title"
             android:persistent="false" />
 
-    <!-- When do not disturb is on -->
-    <com.android.settings.notification.DropDownPreference
-            android:key="zen_mode_notifications"
-            android:title="@string/zen_mode_notifications_title"
-            android:persistent="false" />
-
     <!-- App notifications -->
     <PreferenceScreen
             android:key="app_notifications"
diff --git a/src/com/android/settings/notification/NotificationDisplaySettings.java b/src/com/android/settings/notification/NotificationDisplaySettings.java
index 7842cad..54406f0 100644
--- a/src/com/android/settings/notification/NotificationDisplaySettings.java
+++ b/src/com/android/settings/notification/NotificationDisplaySettings.java
@@ -36,14 +36,12 @@
 
     private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
     private static final String KEY_LOCK_SCREEN_NOTIFICATIONS = "lock_screen_notifications";
-    private static final String KEY_ZEN_MODE_NOTIFICATIONS = "zen_mode_notifications";
 
     private final Handler mHandler = new Handler();
     private final SettingsObserver mSettingsObserver = new SettingsObserver();
 
     private TwoStatePreference mNotificationPulse;
     private DropDownPreference mLockscreen;
-    private DropDownPreference mZenModeNotifications;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -54,7 +52,6 @@
         final PreferenceScreen root = getPreferenceScreen();
         initPulse(root);
         initLockscreenNotifications(root);
-        initZenModeNotifications(root);
     }
 
     @Override
@@ -148,32 +145,6 @@
                 Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0) != 0;
     }
 
-    // === Zen mode notifications ===
-
-    private void initZenModeNotifications(PreferenceScreen parent) {
-        mZenModeNotifications = (DropDownPreference)
-                parent.findPreference(KEY_ZEN_MODE_NOTIFICATIONS);
-        if (mZenModeNotifications == null) return;
-        mZenModeNotifications.addItem(R.string.zen_mode_notifications_summary_hide, 0);
-        mZenModeNotifications.addItem(R.string.zen_mode_notifications_summary_show, 1);
-        updateZenModeNotifications();
-        mZenModeNotifications.setCallback(new DropDownPreference.Callback() {
-            @Override
-            public boolean onItemSelected(int pos, Object value) {
-                final int val = (Integer) value;
-                Settings.Secure.putInt(getContentResolver(),
-                        Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, val);
-                return true;
-            }
-        });
-    }
-
-    private void updateZenModeNotifications() {
-        if (mZenModeNotifications == null) return;
-        mZenModeNotifications.setSelectedValue(Settings.Secure.getInt(getContentResolver(),
-                Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, 0));
-    }
-
     // === Callbacks ===
 
     private final class SettingsObserver extends ContentObserver {
@@ -183,8 +154,6 @@
                 Settings.Secure.getUriFor(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
         private final Uri LOCK_SCREEN_SHOW_URI =
                 Settings.Global.getUriFor(Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS);
-        private final Uri DISPLAY_INTERCEPTED_NOTIFICATIONS_URI =
-                Settings.Secure.getUriFor(Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS);
 
         public SettingsObserver() {
             super(mHandler);
@@ -196,7 +165,6 @@
                 cr.registerContentObserver(NOTIFICATION_LIGHT_PULSE_URI, false, this);
                 cr.registerContentObserver(LOCK_SCREEN_PRIVATE_URI, false, this);
                 cr.registerContentObserver(LOCK_SCREEN_SHOW_URI, false, this);
-                cr.registerContentObserver(DISPLAY_INTERCEPTED_NOTIFICATIONS_URI, false, this);
             } else {
                 cr.unregisterContentObserver(this);
             }
@@ -211,9 +179,6 @@
             if (LOCK_SCREEN_PRIVATE_URI.equals(uri) || LOCK_SCREEN_SHOW_URI.equals(uri)) {
                 updateLockscreenNotifications();
             }
-            if (DISPLAY_INTERCEPTED_NOTIFICATIONS_URI.equals(uri)) {
-                updateZenModeNotifications();
-            }
         }
     }
 }