Loading services/core/java/com/android/server/notification/NotificationManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -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; Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +6 −5 Original line number Diff line number Diff line Loading @@ -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;