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

Commit 82215ddd authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "Revert "Add storage selection (2/2)""

This reverts commit 27f80c30.
parent 6d943544
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -69,6 +69,26 @@ public class StateManager {
        if (mIsResumed) state.resume();
    }

    //Starts state without 'transitionOnNextPause'
    public void startStateNow(Class<? extends ActivityState> klass, Bundle data) {
        Log.v(TAG, "startStateNow " + klass);
        ActivityState state = null;
        try {
            state = klass.newInstance();
        } catch (Exception e) {
            throw new AssertionError(e);
        }
        if (!mStack.isEmpty()) {
            ActivityState top = getTopState();
            if (mIsResumed) top.onPause();
        }
        state.initialize(mActivity, data);

        mStack.push(new StateEntry(data, state));
        state.onCreate(data, null);
        if (mIsResumed) state.resume();
    }

    public void startStateForResult(Class<? extends ActivityState> klass,
            int requestCode, Bundle data) {
        Log.v(TAG, "startStateForResult " + klass + ", " + requestCode);