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

Commit af95f9df authored by JW Wang's avatar JW Wang
Browse files

Migrate from ApexManager#getPackageInfo

ApexManager#gePackageInfo will be removed. Use #isApkInUpdatedApex
for the check.

Bug: 225756739
Test: presubmit
Change-Id: I25d351c705be572a4109753f16ded36a02c2b273
parent 31569a17
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;
import static android.permission.PermissionManager.KILL_APP_REASON_GIDS_CHANGED;
import static android.permission.PermissionManager.KILL_APP_REASON_PERMISSIONS_REVOKED;

import static com.android.server.pm.ApexManager.MATCH_ACTIVE_PACKAGE;
import static com.android.server.pm.PackageManagerService.DEBUG_INSTALL;
import static com.android.server.pm.PackageManagerService.DEBUG_PACKAGE_SCANNING;
import static com.android.server.pm.PackageManagerService.DEBUG_PERMISSIONS;
@@ -3240,9 +3239,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
        }
        // Only enforce the allowlist on boot
        if (!mSystemReady) {
            final boolean isInUpdatedApex = containingApexPackageName != null
                    && !apexManager.isFactory(apexManager.getPackageInfo(containingApexPackageName,
                    MATCH_ACTIVE_PACKAGE));
            final boolean isInUpdatedApex = packageSetting.isApkInUpdatedApex();
            // Apps that are in updated apexs' do not need to be allowlisted
            if (!isInUpdatedApex) {
                Slog.w(TAG, "Privileged permission " + permissionName + " for package "