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

Commit a1396220 authored by Jackal Guo's avatar Jackal Guo
Browse files

Rename pmInternal#getPackageUidInternal (4/4)

This method was added to operate as an internal variant of the
public getPackageUid method since pmInternal#getPackageUid already
exist. However, pmInternal#getPackageUid method just called to the
public interface, and enforcing permissions and visibility checks.

Since we don't expect any UID/permission checks in a local service,
any callers to this method requiring permission checks should be
migrated onto the PackageManager public method. Remove the original
pmInternal#getPackageUid and rename #getPackageUidInternal to take
its place.

Bug: 148235092
Test: Build pass and boot
Change-Id: If1ba2aa850036cb2ccb7ef9fc5b8e912155a733b
parent 0f54ce6b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -209,8 +209,8 @@ public class WebViewUpdateService extends SystemService {
        private void grantVisibilityToCaller(String webViewPackageName, int callingUid) {
            final PackageManagerInternal pmInternal = LocalServices.getService(
                    PackageManagerInternal.class);
            final int webviewUid = pmInternal.getPackageUidInternal(
                    webViewPackageName, 0, UserHandle.getUserId(callingUid));
            final int webviewUid = pmInternal.getPackageUid(
                    webViewPackageName, 0 /* flags */, UserHandle.getUserId(callingUid));
            pmInternal.grantImplicitAccess(UserHandle.getUserId(callingUid), null,
                    UserHandle.getAppId(callingUid), webviewUid,
                    true /*direct*/);