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

Commit 25feec7e authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Change protection level from ephemeral to instant

Bug: 62264194
Test: Manual. install an instant app and see that it still works
Change-Id: I411d8775b3a434da8e44fc4ee5b7e088f2f86bd5
parent 81eb318d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ public final class Permission {
        mAppOp = appOp;
        mAppOpAllowed = appOpAllowed;
        mFlags = flags;
        mIsEphemeral = (protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL) != 0;
        mIsEphemeral = (protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) != 0;
        mIsRuntimeOnly = (protectionLevel & PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) != 0;
    }

+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ public class GrantPermissionsActivity extends OverlayTouchActivity
                    != PermissionInfo.PROTECTION_DANGEROUS) {
                return PERMISSION_DENIED;
            }
            if ((pInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL) == 0
            if ((pInfo.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) == 0
                    && callingPackageInfo.applicationInfo.isInstantApp()) {
                return PERMISSION_DENIED;
            }
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ public final class AllAppPermissionsFragment extends SettingsWithHeader {
                    }

                    if (appInfo.isInstantApp()
                            && (perm.protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL)
                            && (perm.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT)
                                == 0) {
                        continue;
                    }
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ public final class AllAppPermissionsFragment extends SettingsWithHeader {
                    continue;
                }
                if (appInfo.isInstantApp()
                        && (perm.protectionLevel & PermissionInfo.PROTECTION_FLAG_EPHEMERAL) == 0) {
                        && (perm.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTANT) == 0) {
                    continue;
                }
                if (appInfo.targetSdkVersion < Build.VERSION_CODES.M