Loading core/java/android/app/ActivityThread.java +9 −2 Original line number Diff line number Diff line Loading @@ -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. // 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() + Loading core/java/android/app/Fragment.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Parcelable; import android.util.AndroidRuntimeException; import android.util.AttributeSet; import android.util.DebugUtils; import android.util.Log; import android.util.SparseArray; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; Loading Loading @@ -108,6 +109,8 @@ final class FragmentState implements Parcelable { mInstance.mRetainInstance = mRetainInstance; mInstance.mDetached = mDetached; mInstance.mFragmentManager = activity.mFragments; if (FragmentManagerImpl.DEBUG) Log.v(FragmentManagerImpl.TAG, "Instantiated fragment " + mInstance); return mInstance; } Loading core/java/android/app/FragmentManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -1074,6 +1074,7 @@ final class FragmentManagerImpl extends FragmentManager { f.setIndex(mAvailIndices.remove(mAvailIndices.size()-1)); mActive.set(f.mIndex, f); } if (DEBUG) Log.v(TAG, "Allocated fragment index " + f); } void makeInactive(Fragment f) { Loading @@ -1081,7 +1082,7 @@ final class FragmentManagerImpl extends FragmentManager { return; } if (DEBUG) Log.v(TAG, "Freeing fragment index " + f.mIndex); if (DEBUG) Log.v(TAG, "Freeing fragment index " + f); mActive.set(f.mIndex, null); if (mAvailIndices == null) { mAvailIndices = new ArrayList<Integer>(); Loading Loading @@ -1493,6 +1494,7 @@ final class FragmentManagerImpl extends FragmentManager { fragments.add(f); f.mRetaining = true; f.mTargetIndex = f.mTarget != null ? f.mTarget.mIndex : -1; if (DEBUG) Log.v(TAG, "retainNonConfig: keeping retained " + f); } } } Loading services/java/com/android/server/am/ActivityStack.java +5 −1 Original line number Diff line number Diff line Loading @@ -2619,6 +2619,7 @@ final class ActivityStack { } boolean addingToTask = false; boolean movedHome = false; TaskRecord reuseTask = null; if (((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && (launchFlags&Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0) Loading Loading @@ -2657,6 +2658,7 @@ final class ActivityStack { if (callerAtFront) { // We really do want to push this one into the // user's face, right now. movedHome = true; moveHomeToFrontFromLaunchLocked(launchFlags); moveTaskToFrontLocked(taskTop.task, r, options); } Loading Loading @@ -2835,7 +2837,9 @@ final class ActivityStack { r.setTask(reuseTask, reuseTask, true); } newTask = true; if (!movedHome) { moveHomeToFrontFromLaunchLocked(launchFlags); } } else if (sourceRecord != null) { if (!addingToTask && Loading Loading
core/java/android/app/ActivityThread.java +9 −2 Original line number Diff line number Diff line Loading @@ -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. // 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() + Loading
core/java/android/app/Fragment.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Parcelable; import android.util.AndroidRuntimeException; import android.util.AttributeSet; import android.util.DebugUtils; import android.util.Log; import android.util.SparseArray; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; Loading Loading @@ -108,6 +109,8 @@ final class FragmentState implements Parcelable { mInstance.mRetainInstance = mRetainInstance; mInstance.mDetached = mDetached; mInstance.mFragmentManager = activity.mFragments; if (FragmentManagerImpl.DEBUG) Log.v(FragmentManagerImpl.TAG, "Instantiated fragment " + mInstance); return mInstance; } Loading
core/java/android/app/FragmentManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -1074,6 +1074,7 @@ final class FragmentManagerImpl extends FragmentManager { f.setIndex(mAvailIndices.remove(mAvailIndices.size()-1)); mActive.set(f.mIndex, f); } if (DEBUG) Log.v(TAG, "Allocated fragment index " + f); } void makeInactive(Fragment f) { Loading @@ -1081,7 +1082,7 @@ final class FragmentManagerImpl extends FragmentManager { return; } if (DEBUG) Log.v(TAG, "Freeing fragment index " + f.mIndex); if (DEBUG) Log.v(TAG, "Freeing fragment index " + f); mActive.set(f.mIndex, null); if (mAvailIndices == null) { mAvailIndices = new ArrayList<Integer>(); Loading Loading @@ -1493,6 +1494,7 @@ final class FragmentManagerImpl extends FragmentManager { fragments.add(f); f.mRetaining = true; f.mTargetIndex = f.mTarget != null ? f.mTarget.mIndex : -1; if (DEBUG) Log.v(TAG, "retainNonConfig: keeping retained " + f); } } } Loading
services/java/com/android/server/am/ActivityStack.java +5 −1 Original line number Diff line number Diff line Loading @@ -2619,6 +2619,7 @@ final class ActivityStack { } boolean addingToTask = false; boolean movedHome = false; TaskRecord reuseTask = null; if (((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && (launchFlags&Intent.FLAG_ACTIVITY_MULTIPLE_TASK) == 0) Loading Loading @@ -2657,6 +2658,7 @@ final class ActivityStack { if (callerAtFront) { // We really do want to push this one into the // user's face, right now. movedHome = true; moveHomeToFrontFromLaunchLocked(launchFlags); moveTaskToFrontLocked(taskTop.task, r, options); } Loading Loading @@ -2835,7 +2837,9 @@ final class ActivityStack { r.setTask(reuseTask, reuseTask, true); } newTask = true; if (!movedHome) { moveHomeToFrontFromLaunchLocked(launchFlags); } } else if (sourceRecord != null) { if (!addingToTask && Loading