use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManagerTest method testProvisionalSelection_Apply.
public void testProvisionalSelection_Apply() {
Selection s = mManager.getSelection();
SparseBooleanArray provisional = new SparseBooleanArray();
provisional.append(1, true);
provisional.append(2, true);
s.setProvisionalSelection(getItemIds(provisional));
s.applyProvisionalSelection();
assertSelection(items.get(1), items.get(2));
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by DirtyUnicorns.
the class MultiSelectManagerTest method testProvisionalSelection.
public void testProvisionalSelection() {
Selection s = mManager.getSelection();
assertSelection();
SparseBooleanArray provisional = new SparseBooleanArray();
provisional.append(1, true);
provisional.append(2, true);
s.setProvisionalSelection(getItemIds(provisional));
assertSelection(items.get(1), items.get(2));
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by DirtyUnicorns.
the class MultiSelectManagerTest method assertSelectionSize.
private void assertSelectionSize(int expected) {
Selection selection = mManager.getSelection();
assertEquals(selection.toString(), expected, selection.size());
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by DirtyUnicorns.
the class MultiSelectManagerTest method testProvisionalSelection_IntersectsAppliedSelection.
public void testProvisionalSelection_IntersectsAppliedSelection() {
mManager.toggleSelection(items.get(1));
mManager.toggleSelection(items.get(2));
Selection s = mManager.getSelection();
SparseBooleanArray provisional = new SparseBooleanArray();
provisional.append(2, true);
provisional.append(3, true);
s.setProvisionalSelection(getItemIds(provisional));
assertSelection(items.get(1), items.get(2), items.get(3));
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by DirtyUnicorns.
the class MultiSelectManagerTest method testProvisionalSelection_Replace.
public void testProvisionalSelection_Replace() {
Selection s = mManager.getSelection();
SparseBooleanArray provisional = new SparseBooleanArray();
provisional.append(1, true);
provisional.append(2, true);
s.setProvisionalSelection(getItemIds(provisional));
provisional.clear();
provisional.append(3, true);
provisional.append(4, true);
s.setProvisionalSelection(getItemIds(provisional));
assertSelection(items.get(3), items.get(4));
}
Aggregations