am 96abb48d: am aa93bcd6: Fix issue #3138926: App\'s preferences can be lost after onPause()

This commit is contained in:
Dianne Hackborn
2010-10-27 15:02:44 -07:00
committed by Android Git Automerger
2 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -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);