summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm/ApplicationInfo.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@android.com>2009-09-01 20:32:49 -0700
committerChristopher Tate <ctate@android.com>2009-09-01 20:59:36 -0700
commit5e1ab335e6e8fbfa19c64d53880a22f472010953 (patch)
tree4da429b3833ff29256d23f9e2e7f1b3a41715b65 /core/java/android/content/pm/ApplicationInfo.java
parentc937b5ce4ff2f39fd9c60f718f98550a932b62f0 (diff)
downloadframeworks_base-5e1ab335e6e8fbfa19c64d53880a22f472010953.zip
frameworks_base-5e1ab335e6e8fbfa19c64d53880a22f472010953.tar.gz
frameworks_base-5e1ab335e6e8fbfa19c64d53880a22f472010953.tar.bz2
Expand apps' control over the settings restore process
Applications can now specify two more aspects of the restore process: whether they need to run with their own custom Application subclass rather than being launched in the usual restricted mode during restore, and whether it's okay for the backup manager to kill the app process once restore has completed. The new manifest attributes for these are, respectively, android:restoreNeedsApplication and android:killAfterRestore. If unspecified in the manifest, restoreNeedsApplication is false, and killAfterRestore is true. In order to support kill-after-restore cleanly, this change also adds a new system-process-only interface to the Activity Manager, which will schedule a "commit suicide" event on the target app's main thread looper. The framework backup agents have been given the appropriate new backup attributes as well.
Diffstat (limited to 'core/java/android/content/pm/ApplicationInfo.java')
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java27
1 files changed, 25 insertions, 2 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 0a42a6f..8839f95 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -184,7 +184,29 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* {@hide}
*/
public static final int FLAG_ALLOW_BACKUP = 1<<14;
-
+
+ /**
+ * Value for {@link #flags}: this is false if the application has set
+ * its android:killAfterRestore to false, true otherwise.
+ *
+ * <p>If android:allowBackup is set to false or no android:backupAgent
+ * is specified, this flag will be ignored.
+ *
+ * {@hide}
+ */
+ public static final int FLAG_KILL_AFTER_RESTORE = 1<<15;
+
+ /**
+ * Value for {@link #flags}: this is true if the application has set
+ * its android:restoreNeedsApplication to true, false otherwise.
+ *
+ * <p>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_NEEDS_APPLICATION = 1<<16;
+
/**
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
@@ -193,7 +215,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP},
* {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS},
* {@link #FLAG_SUPPORTS_NORMAL_SCREENS},
- * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_RESIZEABLE_FOR_SCREENS}.
+ * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_RESIZEABLE_FOR_SCREENS},
+ * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}.
*/
public int flags = 0;