NAS setting migration
Cancel onboarding notification when user migrates from settings Test: make RunSettingsRoboTests Bug: 185428329 Change-Id: I8b6b2eb8340442907c363e686bbd0b32b62d0db0
This commit is contained in:
@@ -122,13 +122,13 @@ public class NotificationAssistantPreferenceControllerTest {
|
||||
assertEquals(1, Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.NAS_SETTINGS_UPDATED, 0, 10));
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(true));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(true));
|
||||
|
||||
//Test user enable again, migration should not happen
|
||||
mPreferenceController.setNotificationAssistantGranted(mNASComponent);
|
||||
//Number of invocations should not increase
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(true));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -146,13 +146,13 @@ public class NotificationAssistantPreferenceControllerTest {
|
||||
assertEquals(0, Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.NAS_SETTINGS_UPDATED, 0, 20));
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(true));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(true));
|
||||
|
||||
//Test user enable again, migration should not happen
|
||||
mPreferenceController.setNotificationAssistantGranted(mNASComponent);
|
||||
//Number of invocations should not increase
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(true));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -170,13 +170,13 @@ public class NotificationAssistantPreferenceControllerTest {
|
||||
assertEquals(1, Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.NAS_SETTINGS_UPDATED, 0, 10));
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(false));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(false));
|
||||
|
||||
//Test user disable again, migration should not happen
|
||||
mPreferenceController.setChecked(false);
|
||||
//Number of invocations should not increase
|
||||
verify(mBackend, times(1))
|
||||
.resetDefaultNotificationAssistant(eq(false));
|
||||
.setNASMigrationDoneAndResetDefault(eq(0), eq(false));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user