File tree Expand file tree Collapse file tree
services/core/java/com/android/server/notification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1642,6 +1642,7 @@ private void enforceSystemOrSystemUI(String message) {
16421642 }
16431643
16441644 private void enforcePolicyAccess (String pkg , String method ) {
1645+ checkCallerIsSameApp (pkg );
16451646 if (!checkPolicyAccess (pkg )) {
16461647 Slog .w (TAG , "Notification policy access denied calling " + method );
16471648 throw new SecurityException ("Notification policy access denied" );
@@ -3130,6 +3131,10 @@ private static void checkCallerIsSystemOrSameApp(String pkg) {
31303131 if (isCallerSystem ()) {
31313132 return ;
31323133 }
3134+ checkCallerIsSameApp (pkg );
3135+ }
3136+
3137+ private static void checkCallerIsSameApp (String pkg ) {
31333138 final int uid = Binder .getCallingUid ();
31343139 try {
31353140 ApplicationInfo ai = AppGlobals .getPackageManager ().getApplicationInfo (
You can’t perform that action at this time.
0 commit comments