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

Commit fa2d40ae authored by Tony Huang's avatar Tony Huang Committed by Android (Google) Code Review
Browse files

Merge "Fix crash when stack push"

parents c4b8d34e 0bd88fb2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -412,6 +412,11 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
        }

        assert(currentDoc != null);
        if (currentDoc.equals(mState.stack.peek())) {
            Log.w(TAG, "This DocumentInfo is already in current DocumentsStack");
            return;
        }

        mActivity.notifyDirectoryNavigated(currentDoc.derivedUri);

        mState.stack.push(currentDoc);
+8 −0
Original line number Diff line number Diff line
@@ -255,6 +255,14 @@ public class ActionHandlerTest {
        mActivity.refreshCurrentRootAndDirectory.assertCalled();
    }

    @Test
    public void testOpenContainerDocument_sameDocumentInfo() {
        mHandler.openContainerDocument(TestEnv.FOLDER_0);
        mHandler.openContainerDocument(TestEnv.FOLDER_0);

        assertEquals(1, mEnv.state.stack.size());
    }

    @Test
    public void testIncreasePickCountRecordCalled() throws Exception {
        mEnv.state.action = State.ACTION_GET_CONTENT;