Loading packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java +2 −3 Original line number Diff line number Diff line Loading @@ -1125,8 +1125,7 @@ public class DirectoryFragment extends Fragment List<String> modelIds = mAdapter.getModelIds(); // Get the current selection. String[] alreadySelected = mSelectionManager.getSelection().getAll(); for (String id : alreadySelected) { for (String id : mSelectionManager.getSelection().getAll()) { enabled.add(id); } Loading Loading @@ -1790,7 +1789,7 @@ public class DirectoryFragment extends Fragment updateLayout(state.derivedMode); if (mSelection != null) { mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelectionManager.setItemsSelected(mSelection.getAll(), true); mSelection.clear(); } Loading packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java +7 −12 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public final class MultiSelectManager { * Updates selection to include items in {@code selection}. */ public void updateSelection(Selection selection) { setItemsSelected(selection.toList(), true); setItemsSelected(selection.getAll(), true); } /** Loading Loading @@ -641,18 +641,13 @@ public final class MultiSelectManager { } /** * Returns an unordered array of selected positions. * Returns an unordered array of selected positions, including any * provisional selection currently in effect. */ public String[] getAll() { return toList().toArray(new String[0]); } /** * Returns an unordered array of selected positions (including any * provisional selections current in effect). */ public List<String> toList() { ArrayList<String> selection = new ArrayList<String>(mSelection); public List<String> getAll() { ArrayList<String> selection = new ArrayList<String>(mSelection.size() + mProvisionalSelection.size()); selection.addAll(mSelection); selection.addAll(mProvisionalSelection); return selection; } Loading Loading
packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java +2 −3 Original line number Diff line number Diff line Loading @@ -1125,8 +1125,7 @@ public class DirectoryFragment extends Fragment List<String> modelIds = mAdapter.getModelIds(); // Get the current selection. String[] alreadySelected = mSelectionManager.getSelection().getAll(); for (String id : alreadySelected) { for (String id : mSelectionManager.getSelection().getAll()) { enabled.add(id); } Loading Loading @@ -1790,7 +1789,7 @@ public class DirectoryFragment extends Fragment updateLayout(state.derivedMode); if (mSelection != null) { mSelectionManager.setItemsSelected(mSelection.toList(), true); mSelectionManager.setItemsSelected(mSelection.getAll(), true); mSelection.clear(); } Loading
packages/DocumentsUI/src/com/android/documentsui/dirlist/MultiSelectManager.java +7 −12 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public final class MultiSelectManager { * Updates selection to include items in {@code selection}. */ public void updateSelection(Selection selection) { setItemsSelected(selection.toList(), true); setItemsSelected(selection.getAll(), true); } /** Loading Loading @@ -641,18 +641,13 @@ public final class MultiSelectManager { } /** * Returns an unordered array of selected positions. * Returns an unordered array of selected positions, including any * provisional selection currently in effect. */ public String[] getAll() { return toList().toArray(new String[0]); } /** * Returns an unordered array of selected positions (including any * provisional selections current in effect). */ public List<String> toList() { ArrayList<String> selection = new ArrayList<String>(mSelection); public List<String> getAll() { ArrayList<String> selection = new ArrayList<String>(mSelection.size() + mProvisionalSelection.size()); selection.addAll(mSelection); selection.addAll(mProvisionalSelection); return selection; } Loading