Disable Enhanced notifications setting when default NAS is not available am: 236eaed326
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20188999 Change-Id: I68d337b4d5b947a7e0af817cb0c76039df18dbf8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -226,4 +226,14 @@ public class NotificationAssistantPreferenceControllerTest {
|
||||
.setNASMigrationDoneAndResetDefault(eq(10), anyBoolean());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNASUnavailable_settingDisabled() throws Exception {
|
||||
when(mBackend.getDefaultNotificationAssistant()).thenReturn(null);
|
||||
mPreferenceController.getDefaultNASIntent();
|
||||
mPreferenceController.updateState(mPreference);
|
||||
|
||||
verify(mPreference, times(1)).setSwitchEnabled(eq(false));
|
||||
assertFalse(mPreference.isEnabled());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user