Merge "NAS Setting Migration" into sc-dev

This commit is contained in:
Chloris Kuo
2021-04-22 00:23:25 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 2 deletions

View File

@@ -189,7 +189,7 @@ interface INotificationManager
ComponentName getAllowedNotificationAssistantForUser(int userId);
ComponentName getAllowedNotificationAssistant();
ComponentName getDefaultNotificationAssistant();
void resetDefaultNotificationAssistant(boolean loadFromConfig);
void setNASMigrationDoneAndResetDefault(int userId, boolean loadFromConfig);
boolean hasEnabledNotificationListener(String packageName, int userId);
@UnsupportedAppUsage

View File

@@ -5177,8 +5177,13 @@ public class NotificationManagerService extends SystemService {
}
@Override
public void resetDefaultNotificationAssistant(boolean loadFromConfig) {
public void setNASMigrationDoneAndResetDefault(int userId, boolean loadFromConfig) {
checkCallerIsSystem();
setNASMigrationDone(userId);
cancelNotificationInternal(getContext().getPackageName(),
getContext().getOpPackageName(), Binder.getCallingUid(),
Binder.getCallingPid(), TAG,
SystemMessageProto.SystemMessage.NOTE_NAS_UPGRADE, userId);
if (loadFromConfig) {
mAssistants.resetDefaultFromConfig();
} else {