use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManager_SelectionTest method testEqualsOther.
public void testEqualsOther() {
Selection other = new Selection();
other.add(ids[0]);
other.add(ids[1]);
other.add(ids[2]);
assertEquals(selection, other);
assertEquals(selection.hashCode(), other.hashCode());
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManager_SelectionTest method testNotEquals.
public void testNotEquals() {
Selection other = new Selection();
other.add("foobar");
assertFalse(selection.equals(other));
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManager_SelectionTest method setUp.
@Override
public void setUp() throws Exception {
selection = new Selection();
selection.add(ids[0]);
selection.add(ids[1]);
selection.add(ids[2]);
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class ModelTest method positionToSelection.
private Selection positionToSelection(int... positions) {
String[] ids = model.getModelIds();
Selection s = new Selection();
// Construct a selection of the given positions.
for (int p : positions) {
s.add(ids[p]);
}
return s;
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManagerTest method testProvisionalSelection_IntersectsExistingProvisionalSelection.
public void testProvisionalSelection_IntersectsExistingProvisionalSelection() {
Selection s = mManager.getSelection();
SparseBooleanArray provisional = new SparseBooleanArray();
provisional.append(1, true);
provisional.append(2, true);
s.setProvisionalSelection(getItemIds(provisional));
provisional.clear();
provisional.append(1, true);
s.setProvisionalSelection(getItemIds(provisional));
assertSelection(items.get(1));
}
Aggregations