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

Commit 82d4d7fd authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "Allow reading min user aspect ratio value from different user" into udc-qpr-dev

parents 395c0b37 44deda18
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());