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

Commit 458ef104 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents b8df66bd 6d6ac1de
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