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

Commit 968b7c73 authored by Massimo Carli's avatar Massimo Carli Committed by Automerger Merge Worker
Browse files

Merge "Allow reading min user aspect ratio value from different user" into...

Merge "Allow reading min user aspect ratio value from different user" into udc-qpr-dev am: 82d4d7fd am: 1c7c457d

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



Change-Id: Ifcbdb86340760ab42bb051216459751cfdb88604
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 75f58046 1c7c457d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -5179,9 +5179,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
        public int getUserMinAspectRatio(@NonNull String packageName, int userId) {
            final Computer snapshot = snapshotComputer();
            final int callingUid = Binder.getCallingUid();
            snapshot.enforceCrossUserPermission(
                    callingUid, userId, false /* requireFullPermission */,
                    false /* checkShell */, "getUserMinAspectRatio");
            final PackageStateInternal packageState = snapshot
                    .getPackageStateForInstalledAndFiltered(packageName, callingUid, userId);
            return packageState == null ? USER_MIN_ASPECT_RATIO_UNSET
+0 −8
Original line number Diff line number Diff line
@@ -137,14 +137,6 @@ public class CrossUserPackageVisibilityTests {
                        mInstrumentation.getContext().getPackageName(), crossUserId));
    }

    @Test
    public void testGetUserMinAspectRatio_withCrossUserId() {
        final int crossUserId = UserHandle.myUserId() + 1;
        assertThrows(SecurityException.class,
                () -> mIPackageManager.getUserMinAspectRatio(
                        mInstrumentation.getContext().getPackageName(), crossUserId));
    }

    @Test
    public void testIsPackageSignedByKeySet_cannotDetectCrossUserPkg() throws Exception {
        final KeySet keySet = mIPackageManager.getSigningKeySet(mContext.getPackageName());