Fix issue #3138926: App's preferences can be lost after onPause()

Change-Id: Icea3d37fab5e47c89c5cbc0adff7bbec898fa93e
This commit is contained in:
Dianne Hackborn
2010-10-27 13:57:00 -07:00
parent 001c7d1281
commit aa93bcd624
2 changed files with 3 additions and 1 deletions

View File

@@ -1162,7 +1162,6 @@ public class Activity extends ContextThemeWrapper
*/
protected void onPause() {
mCalled = true;
QueuedWork.waitToFinish();
}
/**

View File

@@ -2265,6 +2265,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);