Loading src/com/android/documentsui/dirlist/DirectoryFragment.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class DirectoryFragment extends Fragment private RootInfo mRoot; private RootInfo mRoot; private DocumentInfo mDocument; private DocumentInfo mDocument; private String mQuery = null; private String mQuery = null; // Save selection found during creation so it can be restored during directory loading. private Selection mSelection = null; private Selection mSelection = null; private boolean mSearchMode = false; private boolean mSearchMode = false; private @Nullable ActionMode mActionMode; private @Nullable ActionMode mActionMode; Loading Loading @@ -698,7 +699,7 @@ public class DirectoryFragment extends Fragment public final boolean onBackPressed() { public final boolean onBackPressed() { if (mSelectionManager.hasSelection()) { 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(); mSelectionManager.clearSelection(); return true; return true; } } Loading Loading @@ -1817,6 +1818,7 @@ public class DirectoryFragment extends Fragment if (mSelection != null) { if (mSelection != null) { mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelection.clear(); } } // Restore any previous instance state // Restore any previous instance state Loading Loading
src/com/android/documentsui/dirlist/DirectoryFragment.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class DirectoryFragment extends Fragment private RootInfo mRoot; private RootInfo mRoot; private DocumentInfo mDocument; private DocumentInfo mDocument; private String mQuery = null; private String mQuery = null; // Save selection found during creation so it can be restored during directory loading. private Selection mSelection = null; private Selection mSelection = null; private boolean mSearchMode = false; private boolean mSearchMode = false; private @Nullable ActionMode mActionMode; private @Nullable ActionMode mActionMode; Loading Loading @@ -698,7 +699,7 @@ public class DirectoryFragment extends Fragment public final boolean onBackPressed() { public final boolean onBackPressed() { if (mSelectionManager.hasSelection()) { 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(); mSelectionManager.clearSelection(); return true; return true; } } Loading Loading @@ -1817,6 +1818,7 @@ public class DirectoryFragment extends Fragment if (mSelection != null) { if (mSelection != null) { mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelection.clear(); } } // Restore any previous instance state // Restore any previous instance state Loading