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

Commit 5b1e444b authored by Doris Liu's avatar Doris Liu
Browse files

Stay in AlbumPage when dismissing a popup from AP

Bug: 7384972

Change-Id: Ie2434ecc203a98610f1954b73a3d6916940eb812
parent a4122499
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -454,14 +454,6 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
            clearLoadingBit(BIT_LOADING_SYNC);
            clearLoadingBit(BIT_LOADING_SYNC);
        }
        }
        mActionModeHandler.pause();
        mActionModeHandler.pause();

        // The camera app should always launch in capture mode when
        // resumed, so make the next resume faster by closing the grid
        // view now
        if (mInCameraAndWantQuitOnPause) {
            if (mActivity.getStateManager().getTopState() == this)
                mActivity.getStateManager().finishState(this, false);
        }
    }
    }


    @Override
    @Override
+7 −0
Original line number Original line Diff line number Diff line
@@ -160,6 +160,13 @@ public class StateManager {
        finishState(state, true);
        finishState(state, true);
    }
    }


    public void clearTasks() {
        // Remove all the states that are on top of the bottom PhotoPage state
        while (mStack.size() > 1) {
            mStack.pop().activityState.onDestroy();
        }
    }

    void finishState(ActivityState state, boolean fireOnPause) {
    void finishState(ActivityState state, boolean fireOnPause) {
        // The finish() request could be rejected (only happens under Monkey),
        // The finish() request could be rejected (only happens under Monkey),
        // If it is rejected, we won't close the last page.
        // If it is rejected, we won't close the last page.