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

Commit c56e259f authored by Julia Reynolds's avatar Julia Reynolds Committed by Automerger Merge Worker
Browse files

Merge "[NMS] Call isServiceTokenValidLocked with lock." am: e672a933 am: ce72fe3c

parents d6434c03 ce72fe3c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -9909,10 +9909,16 @@ public class NotificationManagerService extends SystemService {
     * given NAS is bound in.
     */
    private boolean isInteractionVisibleToListener(ManagedServiceInfo info, int userId) {
        boolean isAssistantService = mAssistants.isServiceTokenValidLocked(info.service);
        boolean isAssistantService = isServiceTokenValid(info.service);
        return !isAssistantService || info.isSameUser(userId);
    }
    private boolean isServiceTokenValid(IInterface service) {
        synchronized (mNotificationLock) {
            return mAssistants.isServiceTokenValidLocked(service);
        }
    }
    private boolean isPackageSuspendedForUser(String pkg, int uid) {
        final long identity = Binder.clearCallingIdentity();
        int userId = UserHandle.getUserId(uid);
@@ -11169,7 +11175,7 @@ public class NotificationManagerService extends SystemService {
                BackgroundThread.getHandler().post(() -> {
                    if (info.isSystem
                            || hasCompanionDevice(info)
                            || mAssistants.isServiceTokenValidLocked(info.service)) {
                            || isServiceTokenValid(info.service)) {
                        notifyNotificationChannelChanged(
                                info, pkg, user, channel, modificationType);
                    }