Merge "Don\'t persist selection after restore." into nyc-dev am: 522a437786
am: fd5affdc2c
* commit 'fd5affdc2c42e6911c39e12c9a9e28b47586386a':
Don't persist selection after restore.
Change-Id: I54479952ac3c9aee8321bf2d679f86e691a4d6ef
This commit is contained in:
@@ -170,6 +170,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;
|
||||
@@ -698,7 +699,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;
|
||||
}
|
||||
@@ -1817,6 +1818,7 @@ public class DirectoryFragment extends Fragment
|
||||
|
||||
if (mSelection != null) {
|
||||
mSelectionManager.setItemsSelected(mSelection.toList(), true);
|
||||
mSelection.clear();
|
||||
}
|
||||
|
||||
// Restore any previous instance state
|
||||
|
||||
Reference in New Issue
Block a user