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

Commit 9b267f79 authored by Tony Huang's avatar Tony Huang Committed by android-build-merger
Browse files

Merge "Make global search file not movable" into qt-dev

am: 458ef104

Change-Id: I46d19c0a5dd385757e934098ff62f28ce66e50fb
parents 8778975e 458ef104
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ public abstract class MultiRootDocumentsLoader extends AsyncTaskLoader<Directory
    }

    protected boolean isDocumentsMovable() {
        return true;
        return false;
    }

    protected abstract QueryTask getQueryTask(String authority, List<RootInfo> rootInfos);
+0 −5
Original line number Diff line number Diff line
@@ -64,11 +64,6 @@ public class RecentsLoader extends MultiRootDocumentsLoader {
        return !root.isLocalOnly() || !root.supportsRecents();
    }

    @Override
    protected boolean isDocumentsMovable() {
        return false;
    }

    @Override
    protected QueryTask getQueryTask(String authority, List<RootInfo> rootInfos) {
        return new RecentsTask(authority, rootInfos);
+4 −2
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ public class GlobalSearchLoaderTest {
    }

    @Test
    public void testSearchResult_isMovable() {
    public void testSearchResult_isNotMovable() {
        final DirectoryResult result = mLoader.loadInBackground();

        final Cursor c = result.cursor;
@@ -165,7 +165,9 @@ public class GlobalSearchLoaderTest {

        c.moveToNext();
        final int flags = c.getInt(c.getColumnIndex(Document.COLUMN_FLAGS));
        assertEquals(FILE_FLAG, flags);
        assertEquals(0, flags & Document.FLAG_SUPPORTS_DELETE);
        assertEquals(0, flags & Document.FLAG_SUPPORTS_REMOVE);
        assertEquals(0, flags & Document.FLAG_SUPPORTS_MOVE);
    }

    @Test