diff options
| author | Craig Mautner <cmautner@google.com> | 2014-06-16 17:18:52 -0700 |
|---|---|---|
| committer | Craig Mautner <cmautner@google.com> | 2014-06-17 17:22:58 -0700 |
| commit | 43e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4 (patch) | |
| tree | ee2802fac76c40e9d31311fea66366bdc5d208d4 /core/java/android/app | |
| parent | 5d140e4b1b1d43c742a7d67dd5f9d394c846945f (diff) | |
| download | frameworks_base-43e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4.zip frameworks_base-43e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4.tar.gz frameworks_base-43e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4.tar.bz2 | |
Fix persistent tasks and expand scope
- Fixed missing tag closure on the xml for storing Intent categories.
- Shortened timeout for flushing tasks to persistent storage from
one minute to ten seconds.
- Made persistency the default except for those tasks on the home
stack and those tasks that exclude themselves from the recent task
list.
- Fixed deletion of tasks after restoring. Tasks now survive a second
reboot, not just the first reboot.
- Fixed sort order so most recent tasks will be restored at front.
Fixes bug 15672002.
Change-Id: I16d87d58c6fd2e879cfd0c0b18b2694432a79b71
Diffstat (limited to 'core/java/android/app')
| -rw-r--r-- | core/java/android/app/Activity.java | 19 | ||||
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index f6883e2..90615d3 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -929,7 +929,8 @@ public class Activity extends ContextThemeWrapper /** * Same as {@link #onCreate(android.os.Bundle)} but called for those activities created with - * the attribute {@link android.R.attr#persistable} set true. + * the attribute {@link android.R.attr#persistableMode} set to + * <code>persistAcrossReboots</code>. * * @param savedInstanceState if the activity is being re-initialized after * previously being shut down then this Bundle contains the data it most @@ -1012,8 +1013,9 @@ public class Activity extends ContextThemeWrapper /** * This is the same as {@link #onRestoreInstanceState(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistable}. The {@link - * android.os.PersistableBundle} passed came from the restored PersistableBundle first + * created with the attribute {@link android.R.attr#persistableMode} set to + * <code>persistAcrossReboots</code>. The {@link android.os.PersistableBundle} passed + * came from the restored PersistableBundle first * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. * * <p>This method is called between {@link #onStart} and @@ -1111,7 +1113,8 @@ public class Activity extends ContextThemeWrapper /** * This is the same as {@link #onPostCreate(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistable}. + * created with the attribute {@link android.R.attr#persistableMode} set to + * <code>persistAcrossReboots</code>. * * @param savedInstanceState The data most recently supplied in {@link #onSaveInstanceState} * @param persistentState The data caming from the PersistableBundle first @@ -1352,10 +1355,10 @@ public class Activity extends ContextThemeWrapper /** * This is the same as {@link #onSaveInstanceState} but is called for activities - * created with the attribute {@link android.R.attr#persistable}. The {@link - * android.os.PersistableBundle} passed in will be saved and presented in - * {@link #onCreate(Bundle, PersistableBundle)} the first time that this activity - * is restarted following the next device reboot. + * created with the attribute {@link android.R.attr#persistableMode} set to + * <code>persistAcrossReboots</code>. The {@link android.os.PersistableBundle} passed + * in will be saved and presented in {@link #onCreate(Bundle, PersistableBundle)} + * the first time that this activity is restarted following the next device reboot. * * @param outState Bundle in which to place your saved state. * @param outPersistentState State which will be saved across reboots. diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index ea46044..00cdbd0 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -317,7 +317,7 @@ public final class ActivityThread { } public boolean isPersistable() { - return (activityInfo.flags & ActivityInfo.FLAG_PERSISTABLE) != 0; + return activityInfo.persistableMode == ActivityInfo.PERSIST_ACROSS_REBOOTS; } public String toString() { |
