From c247fa136639dd07278b1954e5fba78ade60614c Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Fri, 2 Jun 2017 10:29:22 -0700 Subject: Change protection level from ephemeral to instant Change-Id: If4b01e5f0728f1d1d7e6903b362dcbedc67a9b3f Fixes: 62264194 Test: Manual. install an instant app and see that it still works --- core/java/android/content/pm/PackageParser.java | 4 ++-- core/java/android/content/pm/PermissionInfo.java | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'core/java/android') diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 7cc02b4f1668..9b9499cd602d 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3235,11 +3235,11 @@ public class PackageParser { perm.info.protectionLevel = PermissionInfo.fixProtectionLevel(perm.info.protectionLevel); if ((perm.info.protectionLevel&PermissionInfo.PROTECTION_MASK_FLAGS) != 0) { - if ( (perm.info.protectionLevel&PermissionInfo.PROTECTION_FLAG_EPHEMERAL) == 0 + if ( (perm.info.protectionLevel&PermissionInfo.PROTECTION_FLAG_INSTANT) == 0 && (perm.info.protectionLevel&PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) == 0 && (perm.info.protectionLevel&PermissionInfo.PROTECTION_MASK_BASE) != PermissionInfo.PROTECTION_SIGNATURE) { - outError[0] = " protectionLevel specifies a non-ephemeral flag but is " + outError[0] = " protectionLevel specifies a non-instnat flag but is " + "not based on signature type"; mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED; return false; diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java index 694e60781546..797db5497390 100644 --- a/core/java/android/content/pm/PermissionInfo.java +++ b/core/java/android/content/pm/PermissionInfo.java @@ -122,13 +122,10 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { /** * Additional flag for {@link #protectionLevel}, corresponding - * to the ephemeral value of + * to the instant value of * {@link android.R.attr#protectionLevel}. - * @hide */ - @SystemApi - @TestApi - public static final int PROTECTION_FLAG_EPHEMERAL = 0x1000; + public static final int PROTECTION_FLAG_INSTANT = 0x1000; /** * Additional flag for {@link #protectionLevel}, corresponding @@ -254,8 +251,8 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable { if ((level&PermissionInfo.PROTECTION_FLAG_SETUP) != 0) { protLevel += "|setup"; } - if ((level&PermissionInfo.PROTECTION_FLAG_EPHEMERAL) != 0) { - protLevel += "|ephemeral"; + if ((level&PermissionInfo.PROTECTION_FLAG_INSTANT) != 0) { + protLevel += "|instant"; } if ((level&PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY) != 0) { protLevel += "|runtime"; -- cgit v1.2.3