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

Commit c263e150 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Surround platform-compat check with Binder.clearCallingIdentity()"

parents 96b878aa 3c584d62
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2710,6 +2710,7 @@ public class NotificationManagerService extends SystemService {

            if (callback != null && !appIsForeground && !isSystemToast) {
                boolean block;
                long id = Binder.clearCallingIdentity();
                try {
                    block = mPlatformCompat.isChangeEnabledByPackageName(
                            CHANGE_BACKGROUND_CUSTOM_TOAST_BLOCK, pkg,
@@ -2719,6 +2720,8 @@ public class NotificationManagerService extends SystemService {
                    Slog.e(TAG, "Unexpected exception while checking block background custom toasts"
                            + " change", e);
                    block = false;
                } finally {
                    Binder.restoreCallingIdentity(id);
                }
                if (block) {
                    // TODO(b/144152069): Remove informative toast