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

Commit 793b8c4a authored by Steve McKay's avatar Steve McKay Committed by android-build-merger
Browse files

Merge "Don\'t persist selection after restore." into nyc-dev am: 522a4377 am: fd5affdc

am: 9e3ed23f

* commit '9e3ed23f':
  Don't persist selection after restore.

Change-Id: I1b9beb7ab84c8bba9d94f388234235b1ad7c565d
parents df787dc1 9e3ed23f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -172,6 +172,7 @@ public class DirectoryFragment extends Fragment
    private RootInfo mRoot;
    private DocumentInfo mDocument;
    private String mQuery = null;
    // Save selection found during creation so it can be restored during directory loading.
    private Selection mSelection = null;
    private boolean mSearchMode = false;
    private @Nullable ActionMode mActionMode;
@@ -700,7 +701,7 @@ public class DirectoryFragment extends Fragment

    public final boolean onBackPressed() {
        if (mSelectionManager.hasSelection()) {
            if (DEBUG) Log.d(TAG, "Clearing selection on back pressed.");
            if (DEBUG) Log.d(TAG, "Clearing selection on selection manager.");
            mSelectionManager.clearSelection();
            return true;
        }
@@ -1875,6 +1876,7 @@ public class DirectoryFragment extends Fragment

        if (mSelection != null) {
            mSelectionManager.setItemsSelected(mSelection.toList(), true);
            mSelection.clear();
        }

        // Restore any previous instance state