summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-27 15:02:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-27 15:02:44 -0700
commite71df8fa166eb2de7fcdecc14d958d3e3b796531 (patch)
tree928d8cc2d7ddbc069344842fd74b50b5867f94f5
parente0b4b869361352b6a811ad59e7a763c6414aa885 (diff)
parent96abb48dff22a54de4ddcdd427d8e5a261d0facc (diff)
downloadframeworks_base-e71df8fa166eb2de7fcdecc14d958d3e3b796531.zip
frameworks_base-e71df8fa166eb2de7fcdecc14d958d3e3b796531.tar.gz
frameworks_base-e71df8fa166eb2de7fcdecc14d958d3e3b796531.tar.bz2
am 96abb48d: am aa93bcd6: Fix issue #3138926: App\'s preferences can be lost after onPause()
-rw-r--r--core/java/android/app/Activity.java1
-rw-r--r--core/java/android/app/ActivityThread.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 378a8bd..33f88d8 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1228,7 +1228,6 @@ public class Activity extends ContextThemeWrapper
*/
protected void onPause() {
mCalled = true;
- QueuedWork.waitToFinish();
}
/**
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 2abe822..c5badaf 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2347,6 +2347,9 @@ public final class ActivityThread {
r.activity.mConfigChangeFlags |= configChanges;
Bundle state = performPauseActivity(token, finished, true);
+ // Make sure any pending writes are now committed.
+ QueuedWork.waitToFinish();
+
// Tell the activity manager we have paused.
try {
ActivityManagerNative.getDefault().activityPaused(token, state);