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

Commit 4d0f0857 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch
Browse files

Move Accounts NotificationChannel earlier, before clearCallingIdentity

Bug: 36122686
Test: Not sure how to repro, couldn't be worse than it already is
Change-Id: I1e5aa9950b765dd3fbf1a01c5f10668761a2bc2e
parent 08a86c82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4843,7 +4843,6 @@ public class AccountManagerService

    private void installNotification(int notificationId, final Notification notification,
            String packageName, int userId) {
        SystemNotificationChannels.createAccountChannelForPackage(packageName, mContext);
        final long token = clearCallingIdentity();
        try {
            INotificationManager notificationManager = mInjector.getNotificationManager();
@@ -5630,6 +5629,7 @@ public class AccountManagerService
            synchronized (mUsers) {
                userAccounts = mUsers.get(userId);
            }
            SystemNotificationChannels.createAccountChannelForPackage(packageName, mContext);
            doNotification(userAccounts, account, null, intent, packageName, userId);
        }

+2 −1
Original line number Diff line number Diff line
@@ -3107,7 +3107,8 @@ public class NotificationManagerService extends SystemService {
                        + " - notification=" + notification);
                return;
            }
            throw new IllegalArgumentException("No Channel found for notification=" + notification);
            throw new IllegalArgumentException("No Channel found for channelId=" + channelId
                    + ", notification=" + notification);
        }
        final StatusBarNotification n = new StatusBarNotification(
                pkg, opPkg, id, tag, notificationUid, callingPid, notification,