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

Commit 7d982a64 authored by Kunal Malhotra's avatar Kunal Malhotra Committed by Automerger Merge Worker
Browse files

Merge "Checking if package belongs to UID before registering broadcast...

Merge "Checking if package belongs to UID before registering broadcast receiver" into tm-qpr-dev am: 7a6e4405

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20642112



Change-Id: Ia67463dd09672b3ab259a4c6590374eae48fcd05
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d2705871 7a6e4405
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -3420,6 +3420,11 @@ public final class ActiveServices {
                            throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
                            throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
                                    + className + " is not an isolatedProcess");
                                    + className + " is not an isolatedProcess");
                        }
                        }
                        if (!mAm.getPackageManagerInternal().isSameApp(callingPackage, callingUid,
                                userId)) {
                            throw new SecurityException("BIND_EXTERNAL_SERVICE failed, "
                                    + "calling package not owned by calling UID ");
                        }
                        // Run the service under the calling package's application.
                        // Run the service under the calling package's application.
                        ApplicationInfo aInfo = AppGlobals.getPackageManager().getApplicationInfo(
                        ApplicationInfo aInfo = AppGlobals.getPackageManager().getApplicationInfo(
                                callingPackage, ActivityManagerService.STOCK_PM_FLAGS, userId);
                                callingPackage, ActivityManagerService.STOCK_PM_FLAGS, userId);