Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dddd6b15 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am 185e3e24: Fix when managed cursors are required.

* commit '185e3e24':
  Fix when managed cursors are required.
parents 80a19e67 185e3e24
Loading
Loading
Loading
Loading
+18 −16
Original line number Diff line number Diff line
@@ -4421,6 +4421,12 @@ public class Activity extends ContextThemeWrapper
    final void performRestart() {
        mFragments.noteStateNotSaved();

        if (mStopped) {
            mStopped = false;
            if (mToken != null && mParent == null) {
                WindowManagerImpl.getDefault().setStoppedState(mToken, false);
            }

            synchronized (mManagedCursors) {
                final int N = mManagedCursors.size();
                for (int i=0; i<N; i++) {
@@ -4428,7 +4434,8 @@ public class Activity extends ContextThemeWrapper
                    if (mc.mReleased || mc.mUpdated) {
                        if (!mc.mCursor.requery()) {
                            throw new IllegalStateException(
                                "trying to requery an already closed cursor");
                                    "trying to requery an already closed cursor  "
                                    + mc.mCursor);
                        }
                        mc.mReleased = false;
                        mc.mUpdated = false;
@@ -4436,12 +4443,7 @@ public class Activity extends ContextThemeWrapper
                }
            }

        if (mStopped) {
            mStopped = false;
            mCalled = false;
            if (mToken != null && mParent == null) {
                WindowManagerImpl.getDefault().setStoppedState(mToken, false);
            }
            mInstrumentation.callActivityOnRestart(this);
            if (!mCalled) {
                throw new SuperNotCalledException(