diff options
-rw-r--r-- | api/current.xml | 11 | ||||
-rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 10 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 6 | ||||
-rw-r--r-- | core/res/res/values/attrs_manifest.xml | 10 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 8 |
5 files changed, 43 insertions, 2 deletions
diff --git a/api/current.xml b/api/current.xml index 24f4bf2..f2696ea 100644 --- a/api/current.xml +++ b/api/current.xml @@ -5663,6 +5663,17 @@ visibility="public" > </field> +<field name="neverEncrypt" + type="int" + transient="false" + volatile="false" + value="16843447" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="nextFocusDown" type="int" transient="false" diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 7a65af8..fca2453 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -208,6 +208,16 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_RESTORE_NEEDS_APPLICATION = 1<<16; /** + * Value for {@link #flags}: this is true if the application has set + * its android:neverEncrypt to true, false otherwise. It is used to specify + * that this package specifically "opts-out" of a secured file system solution, + * and will always store its data in-the-clear. + * + * {@hide} + */ + public static final int FLAG_NEVER_ENCRYPT = 1<<17; + + /** * Flags associated with the application. Any combination of * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index b798bde..04a7f43 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -1410,6 +1410,12 @@ public class PackageParser { ai.flags |= ApplicationInfo.FLAG_TEST_ONLY; } + if (sa.getBoolean( + com.android.internal.R.styleable.AndroidManifestApplication_neverEncrypt, + false)) { + ai.flags |= ApplicationInfo.FLAG_NEVER_ENCRYPT; + } + String str; str = sa.getNonResourceString( com.android.internal.R.styleable.AndroidManifestApplication_permission); diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index 4a3da11..f196b19 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -78,7 +78,14 @@ turned on by default unless explicitly set to false by applications. --> <attr name="allowClearUserData" format="boolean" /> - + + <!-- Option to let applications specify that user data should + never be encrypted if an Encrypted File System solution + is enabled. Specifically, this is an "opt-out" feature, meaning + that, by default, user data will be encrypted if the EFS feature + is enabled.--> + <attr name="neverEncrypt" format="boolean" /> + <!-- Option to indicate this application is only for testing purposes. For example, it may expose functionality or data outside of itself that would cause a security hole, but is useful for testing. This @@ -675,6 +682,7 @@ <attr name="allowBackup" /> <attr name="killAfterRestore" /> <attr name="restoreNeedsApplication" /> + <attr name="neverEncrypt" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 4ede620..12db0ab 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -1204,5 +1204,11 @@ <public type="attr" name="wallpaperAuthor" /> <public type="attr" name="wallpaperDescription" /> <public type="attr" name="autoStart" /> - + +<!-- =============================================================== +Resources proposed for Flan. + =============================================================== --> + <eat-comment /> + <public type="attr" name="neverEncrypt" /> + </resources> |