Merge "Only show the channel toast if users expressly ask for it" into tm-qpr-dev am: 45bcb214da

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19416082

Change-Id: Ie0c44628c38787a16cf055bf5a92c60071f7eaae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Julia Reynolds
2022-07-27 13:19:58 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 19 deletions

View File

@@ -38,10 +38,6 @@ public class NotificationChannelWarningsPreferenceController extends
final static int SETTING_VALUE_ON = 1;
@VisibleForTesting
final static int SETTING_VALUE_OFF = 0;
@VisibleForTesting
final static int DEBUGGING_ENABLED = 1;
@VisibleForTesting
final static int DEBUGGING_DISABLED = 0;
public NotificationChannelWarningsPreferenceController(Context context) {
super(context);
@@ -64,9 +60,8 @@ public class NotificationChannelWarningsPreferenceController extends
@Override
public void updateState(Preference preference) {
final int defaultWarningEnabled = isDebuggable() ? DEBUGGING_ENABLED : DEBUGGING_DISABLED;
final int mode = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled);
Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, 0);
((SwitchPreference) mPreference).setChecked(mode != SETTING_VALUE_OFF);
}