false if the application does not wish
+ * to permit any OS-driven backups of its data; true otherwise.
*
- * {@hide}
+ * Comes from the
+ * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}
+ * attribute of the <application> tag.
*/
public static final int FLAG_ALLOW_BACKUP = 1<<15;
/**
- * Value for {@link #flags}: this is false if the application has set
- * its android:killAfterRestore to false, true otherwise.
+ * Value for {@link #flags}: set to false if the application must be kept
+ * in memory following a full-system restore operation; true otherwise.
+ * Ordinarily, during a full system restore operation each application is shut down
+ * following execution of its agent's onRestore() method. Setting this attribute to
+ * false prevents this. Most applications will not need to set this attribute.
*
- *
If android:allowBackup is set to false or no android:backupAgent + *
If
+ * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}
+ * is set to false or no
+ * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent}
* is specified, this flag will be ignored.
*
- * {@hide}
+ *
Comes from the
+ * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore}
+ * attribute of the <application> tag.
*/
public static final int FLAG_KILL_AFTER_RESTORE = 1<<16;
/**
- * Value for {@link #flags}: this is true if the application has set
- * its android:restoreNeedsApplication to true, false otherwise.
+ * Value for {@link #flags}: Set to true if the application's backup
+ * agent claims to be able to handle restore data even "from the future,"
+ * i.e. from versions of the application with a versionCode greater than
+ * the one currently installed on the device. Use with caution! By default
+ * this attribute is false and the Backup Manager will ensure that data
+ * from "future" versions of the application are never supplied during a restore operation.
*
- *
If android:allowBackup is set to false or no android:backupAgent + *
If
+ * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}
+ * is set to false or no
+ * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent}
* is specified, this flag will be ignored.
*
- * {@hide}
+ *
Comes from the + * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion} + * attribute of the <application> tag. */ - public static final int FLAG_RESTORE_NEEDS_APPLICATION = 1<<17; + public static final int FLAG_RESTORE_ANY_VERSION = 1<<17; /** * Value for {@link #flags}: this is true if the application has set @@ -263,19 +282,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int FLAG_NATIVE_DEBUGGABLE = 1<<21; - /** - * Value for {@link #flags}: Set to true if the application's backup - * agent claims to be able to handle restore data even "from the future," - * i.e. from versions of the application with a versionCode greater than - * the one currently installed on the device. - * - *
If android:allowBackup is set to false or no android:backupAgent
- * is specified, this flag will be ignored.
- *
- * {@hide}
- */
- public static final int FLAG_RESTORE_ANY_VERSION = 1<<22;
-
/**
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 9736b017b3964..c33f3053c958b 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1448,8 +1448,8 @@ public class PackageParser {
if (allowBackup) {
ai.flags |= ApplicationInfo.FLAG_ALLOW_BACKUP;
- // backupAgent, killAfterRestore, restoreNeedsApplication, and restoreAnyVersion
- // are only relevant if backup is possible for the given application.
+ // backupAgent, killAfterRestore, and restoreAnyVersion are only relevant
+ // if backup is possible for the given application.
String backupAgent = sa.getNonConfigurationString(
com.android.internal.R.styleable.AndroidManifestApplication_backupAgent, 0);
if (backupAgent != null) {
@@ -1464,11 +1464,6 @@ public class PackageParser {
true)) {
ai.flags |= ApplicationInfo.FLAG_KILL_AFTER_RESTORE;
}
- if (sa.getBoolean(
- com.android.internal.R.styleable.AndroidManifestApplication_restoreNeedsApplication,
- false)) {
- ai.flags |= ApplicationInfo.FLAG_RESTORE_NEEDS_APPLICATION;
- }
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_restoreAnyVersion,
false)) {
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index d66f513a66dc1..f00572de29f41 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -589,7 +589,7 @@
The default is true, which means that after the application
+ has finished processing its data during a full-system restore, it will be
+ terminated. -->