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

Commit 8275516c authored by Alexander Roederer's avatar Alexander Roederer Committed by Android (Google) Code Review
Browse files

Merge "Fix isSystemUi ManagedServiceInfo bool" into main

parents ea94f6db 449ab85f
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -12050,11 +12050,12 @@ public class NotificationManagerService extends SystemService {
        @Override
        public void onServiceAdded(ManagedServiceInfo info) {
            if (lifetimeExtensionRefactor()) {
                // Generally, only System or System UI should have the permissions to call
                // registerSystemService.
                // isCallerSystemorPhone tells us whether the caller is System. Then, if it's not
                // the system, we know it's system UI.
                info.isSystemUi = !isCallerSystemOrPhone();
                // We explicitly check the status bar permission for the uid in the info object.
                // We can't use the calling uid here because it's probably always system server.
                // Note that this will also be true for the shell.
                info.isSystemUi = getContext().checkPermission(
                        android.Manifest.permission.STATUS_BAR_SERVICE, -1, info.uid)
                        == PERMISSION_GRANTED;
            }
            final INotificationListener listener = (INotificationListener) info.service;
            final NotificationRankingUpdate update;