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

Commit 6e41b575 authored by Tony Huang's avatar Tony Huang Committed by android-build-merger
Browse files

Fix crash issue when drag files

am: 97ce4ce5

Change-Id: Iba2c5502df25f653601be726440ab0ca25956dae
parents fdfcad86 97ce4ce5
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,9 @@ public class DocumentStack implements Durable, Parcelable {


        // Add this for keep stack size is 1 on recent root.
        // Add this for keep stack size is 1 on recent root.
        if (root.isRecents()) {
        if (root.isRecents()) {
            push(new DocumentInfo());
            DocumentInfo rootRecent = new DocumentInfo();
            rootRecent.deriveFields();
            push(rootRecent);
        }
        }
    }
    }


+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.documentsui.base;


import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertFalse;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.assertTrue;


@@ -196,5 +197,6 @@ public class DocumentStackTest {


        assertEquals(1, mStack.size());
        assertEquals(1, mStack.size());
        assertEquals(true, mStack.isRecents());
        assertEquals(true, mStack.isRecents());
        assertNotNull(mStack.peek().derivedUri);
    }
    }
}
}