From abe005922905bab01d77a6f9872cdf3fd2a56334 Mon Sep 17 00:00:00 2001 From: Shiwangi Shah Date: Thu, 15 Dec 2022 12:11:47 +0000 Subject: [PATCH] Fix failures for Webview tests in sandbox Bug: b/261764855 Test: atest WebViewSandboxTest Change-Id: I561f14badc23ee44c757250becc11f6dfb609fb8 --- services/core/java/com/android/server/am/ActiveServices.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index f72321c5d9ac0..39edaf02d768e 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -3869,8 +3869,8 @@ public final class ActiveServices { throw new SecurityException("BIND_EXTERNAL_SERVICE failed, " + className + " is not an isolatedProcess"); } - if (AppGlobals.getPackageManager().getPackageUid(callingPackage, - 0, userId) != callingUid) { + if (!mAm.getPackageManagerInternal().isSameApp(callingPackage, callingUid, + userId)) { throw new SecurityException("BIND_EXTERNAL_SERVICE failed, " + "calling package not owned by calling UID "); }