From 3bec6b94fe95f7da5441c0c37abbcdd0985c1ec6 Mon Sep 17 00:00:00 2001 From: Charles Munger Date: Tue, 15 Sep 2020 18:17:23 +0000 Subject: [PATCH] Clarify docs for FLAG_SYSTEM Bug: 168557744 Change-Id: Ia27aaae7b4f60f843013bd629ebcce4c662828d2 --- core/java/android/content/pm/ApplicationInfo.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 2a78eb97513e1..8f4fc261df37c 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -146,8 +146,15 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public int uiOptions = 0; /** - * Value for {@link #flags}: if set, this application is installed in the - * device's system image. + * Value for {@link #flags}: if set, this application is installed in the device's system image. + * This should not be used to make security decisions. Instead, rely on + * {@linkplain android.content.pm.PackageManager#checkSignatures(java.lang.String,java.lang.String) + * signature checks} or + * permissions. + * + *

Warning: Note that does flag not behave the same as + * {@link android.R.attr#protectionLevel android:protectionLevel} {@code system} or + * {@code signatureOrSystem}. */ public static final int FLAG_SYSTEM = 1<<0;