use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.
the class MultiSelectManagerTest method assertSelected.
private void assertSelected(String... expected) {
for (int i = 0; i < expected.length; i++) {
Selection selection = mManager.getSelection();
String err = String.format("Selection %s does not contain %s", selection, expected[i]);
assertTrue(err, selection.contains(expected[i]));
}
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.
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 ResurrectionRemix.
the class DirectoryFragment method copySelectedToClipboard.
public void copySelectedToClipboard() {
Metrics.logUserAction(getContext(), Metrics.USER_ACTION_COPY_CLIPBOARD);
Selection selection = mSelectionManager.getSelection(new Selection());
if (!selection.isEmpty()) {
copySelectionToClipboard(selection);
mSelectionManager.clearSelection();
}
}
use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by ResurrectionRemix.
the class MultiSelectManager_SelectionTest method testEqualsCopy.
public void testEqualsCopy() {
Selection other = new Selection();
other.copyFrom(selection);
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 MultiSelectManagerTest method assertSelected.
private void assertSelected(String... expected) {
for (int i = 0; i < expected.length; i++) {
Selection selection = mManager.getSelection();
String err = String.format("Selection %s does not contain %s", selection, expected[i]);
assertTrue(err, selection.contains(expected[i]));
}
}
Aggregations