Search in sources :

Example 81 with Selection

use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.

the class MultiSelectManager_SelectionTest method testNotEquals.

public void testNotEquals() {
    Selection other = new Selection();
    other.add("foobar");
    assertFalse(selection.equals(other));
}
Also used : Selection(com.android.documentsui.dirlist.MultiSelectManager.Selection)

Example 82 with Selection

use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.

the class MultiSelectManager_SelectionTest method testIntersection_subset.

public void testIntersection_subset() {
    String[] ids0 = new String[] { "foo", "bar", "baz" };
    String[] ids1 = new String[] { "0", "baz", "1", "foo", "2" };
    Selection testSelection = new Selection();
    testSelection.add(ids0[0]);
    testSelection.add(ids0[1]);
    testSelection.add(ids0[2]);
    testSelection.intersect(Sets.newHashSet(ids1));
    assertTrue(testSelection.contains("foo"));
    assertFalse(testSelection.contains("bar"));
    assertTrue(testSelection.contains("baz"));
}
Also used : Selection(com.android.documentsui.dirlist.MultiSelectManager.Selection)

Example 83 with Selection

use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.

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]);
}
Also used : Selection(com.android.documentsui.dirlist.MultiSelectManager.Selection)

Example 84 with Selection

use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.

the class MultiSelectManager_SelectionTest method testIntersection_empty1.

public void testIntersection_empty1() {
    Selection testSelection = new Selection();
    testSelection.intersect(Sets.newHashSet("foo"));
    assertTrue(testSelection.isEmpty());
}
Also used : Selection(com.android.documentsui.dirlist.MultiSelectManager.Selection)

Example 85 with Selection

use of com.android.documentsui.dirlist.MultiSelectManager.Selection in project android_frameworks_base by AOSPA.

the class MultiSelectManager_SelectionTest method testEqualsCopy.

public void testEqualsCopy() {
    Selection other = new Selection();
    other.copyFrom(selection);
    assertEquals(selection, other);
    assertEquals(selection.hashCode(), other.hashCode());
}
Also used : Selection(com.android.documentsui.dirlist.MultiSelectManager.Selection)

Aggregations

Selection (com.android.documentsui.dirlist.MultiSelectManager.Selection)110 SparseBooleanArray (android.util.SparseBooleanArray)30 Bundle (android.os.Bundle)10 ActivityManager (android.app.ActivityManager)5 FragmentTransaction (android.app.FragmentTransaction)5 Context (android.content.Context)5 Point (android.graphics.Point)5 AccessibilityNodeInfoCompat (android.support.v4.view.accessibility.AccessibilityNodeInfoCompat)5 GridLayoutManager (android.support.v7.widget.GridLayoutManager)5 SpanSizeLookup (android.support.v7.widget.GridLayoutManager.SpanSizeLookup)5 RecyclerView (android.support.v7.widget.RecyclerView)5 Recycler (android.support.v7.widget.RecyclerView.Recycler)5 ViewHolder (android.support.v7.widget.RecyclerView.ViewHolder)5 View (android.view.View)5 ImageView (android.widget.ImageView)5 TextView (android.widget.TextView)5 DocumentClipper (com.android.documentsui.DocumentClipper)5 State (com.android.documentsui.State)5