NAS setting migration

Cancel onboarding notification when user migrates from settings

Test: make RunSettingsRoboTests
Bug: 185428329
Change-Id: I8b6b2eb8340442907c363e686bbd0b32b62d0db0
This commit is contained in:
Chloris Kuo
2021-04-20 19:03:56 -07:00
parent 2affde3202
commit f06f289a85
3 changed files with 9 additions and 13 deletions

View File

@@ -77,11 +77,7 @@ public class NotificationAssistantPreferenceController extends TogglePreferenceC
protected void setNotificationAssistantGranted(ComponentName cn) {
if (Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.NAS_SETTINGS_UPDATED, 0, mUserId) == 0) {
for (int profileId : mUserManager.getProfileIds(mUserId, false)) {
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.NAS_SETTINGS_UPDATED, 1, profileId);
}
mNotificationBackend.resetDefaultNotificationAssistant(cn != null);
mNotificationBackend.setNASMigrationDoneAndResetDefault(mUserId, cn != null);
}
mNotificationBackend.setNotificationAssistantGranted(cn);
}