summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/pm/PackageManagerInternal.java12
-rw-r--r--core/java/android/content/pm/PackageParser.java3
2 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index 0c5f228782ae..f30b3fee7f46 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -616,4 +616,16 @@ public abstract class PackageManagerInternal {
*/
public abstract boolean isDataRestoreSafe(@NonNull Signature restoringFromSig,
@NonNull String packageName);
+
+
+ /**
+ * Returns true if the the signing information for {@code clientUid} is sufficient to gain
+ * access gated by {@code capability}. This can happen if the two UIDs have the same signing
+ * information, if the signing information {@code clientUid} indicates that it has the signing
+ * certificate for {@code serverUid} in its signing history (if it was previously signed by it),
+ * or if the signing certificate for {@code clientUid} is in ths signing history for {@code
+ * serverUid} and with the {@code capability} specified.
+ */
+ public abstract boolean hasSignatureCapability(int serverUid, int clientUid,
+ @PackageParser.SigningDetails.CertCapabilities int capability);
}
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 453a74aa1c96..2da2cb4c9285 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -5706,6 +5706,9 @@ public class PackageParser {
/** allow pkg to update to one signed by this certificate */
int ROLLBACK = 8;
+
+ /** allow pkg to continue to have auth access gated by this cert */
+ int AUTH = 16;
}
/**