Only show the channel toast if users expressly ask for it
Test: NotificationChannelWarningsPreferenceControllerTest.java Bug: 231150048 Change-Id: I4797a2184561ae3dcd03e62bfb78a90686458c6b
This commit is contained in:
@@ -102,7 +102,7 @@ public class NotificationChannelWarningsPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_settingUndefinedDebuggingEnabled_preferenceShouldBeChecked() {
|
||||
public void updateState_settingUndefinedDebuggingEnabled_preferenceShouldNotBeChecked() {
|
||||
mController = spy(mController);
|
||||
doReturn(true).when(mController).isDebuggable();
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
@@ -110,18 +110,6 @@ public class NotificationChannelWarningsPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
verify(mPreference).setChecked(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_settingUndefinedDebuggingDisabled_preferenceShouldNotBeChecked() {
|
||||
mController = spy(mController);
|
||||
doReturn(false).when(mController).isDebuggable();
|
||||
Settings.Global.putString(mContext.getContentResolver(),
|
||||
Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, "NotAnInteger");
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
verify(mPreference).setChecked(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user