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

Commit 1c7c457d 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

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



Change-Id: Ibcd16a6f547ee24d0cf0e9ea78a324614ffddf05
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e29b15fd 82d4d7fd
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -5257,9 +5257,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());