diff options
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r-- | core/java/android/app/ActivityThread.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 5085b1e..b29035d 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -2090,8 +2090,15 @@ public final class ActivityThread { r.activity.mCalled = false; mInstrumentation.callActivityOnPause(r.activity); // We need to keep around the original state, in case - // we need to be created again. - r.state = oldState; + // we need to be created again. But we only do this + // for pre-Honeycomb apps, which always save their state + // when pausing, so we can not have them save their state + // when restarting from a paused state. For HC and later, + // we want to (and can) let the state be saved as the normal + // part of stopping the activity. + if (r.isPreHoneycomb()) { + r.state = oldState; + } if (!r.activity.mCalled) { throw new SuperNotCalledException( "Activity " + r.intent.getComponent().toShortString() + |