Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e67161b7 authored by Chloris Kuo's avatar Chloris Kuo
Browse files

NAS Setting Migration

Cancel onboarding notification when user migrates from settings

Bug: 185428329
Test: atest NotificationManagerServiceTest, NotificationAssistantsTest
Change-Id: I24941e7e046d4b43978db11b9b58516aeaaf0ef3
parent 681f269d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+6 −1
Original line number Diff line number Diff line
@@ -5179,8 +5179,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 {