summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/BadgingNotificationPreferenceController.java
diff options
context:
space:
mode:
authorMatthew Fritze <mfritze@google.com>2018-05-18 17:59:26 -0700
committerMatthew Fritze <mfritze@google.com>2018-05-22 11:06:42 -0700
commitbf1f5b58138478ca350c3853445c06d871064a62 (patch)
tree10a7bc319cf93a144a0a7b6b3d397f299923dc6f /src/com/android/settings/notification/BadgingNotificationPreferenceController.java
parent49d8b0a3e4e8c73ce0dac0e681855eccd1c34511 (diff)
downloadpackages_apps_Settings-bf1f5b58138478ca350c3853445c06d871064a62.tar.gz
packages_apps_Settings-bf1f5b58138478ca350c3853445c06d871064a62.tar.bz2
packages_apps_Settings-bf1f5b58138478ca350c3853445c06d871064a62.zip
Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices, dictated by controllers which return true for the new method isSliceable. Updating the supported settings to a whitelist means that the method to return all available slices must be updated, and checking slicability when we index slices. Test: robotests Bug: 79779103 Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Diffstat (limited to 'src/com/android/settings/notification/BadgingNotificationPreferenceController.java')
-rw-r--r--src/com/android/settings/notification/BadgingNotificationPreferenceController.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/settings/notification/BadgingNotificationPreferenceController.java b/src/com/android/settings/notification/BadgingNotificationPreferenceController.java
index c9e190f41f..6576e02108 100644
--- a/src/com/android/settings/notification/BadgingNotificationPreferenceController.java
+++ b/src/com/android/settings/notification/BadgingNotificationPreferenceController.java
@@ -28,10 +28,10 @@ import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.TwoStatePreference;
+import android.text.TextUtils;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.core.TogglePreferenceController;
-import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settings.R;
import com.android.settings.search.DatabaseIndexingUtils;
import com.android.settings.search.InlineSwitchPayload;
@@ -89,6 +89,11 @@ public class BadgingNotificationPreferenceController extends TogglePreferenceCon
}
@Override
+ public boolean isSliceable() {
+ return TextUtils.equals(getPreferenceKey(), "notification_badging");
+ }
+
+ @Override
public boolean isChecked() {
return Settings.Secure.getInt(mContext.getContentResolver(),
NOTIFICATION_BADGING, ON) == ON;