Home
last modified time | relevance | path

Searched refs:SortDimension (Results 1 – 16 of 16) sorted by relevance

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/
DSortModelTest.java43 private static final SortDimension DIMENSION_1 = new SortDimension.Builder()
46 .withDataType(SortDimension.DATA_TYPE_STRING)
47 .withSortCapability(SortDimension.SORT_CAPABILITY_BOTH_DIRECTION)
48 .withDefaultSortDirection(SortDimension.SORT_DIRECTION_ASCENDING)
52 private static final SortDimension DIMENSION_2 = new SortDimension.Builder()
55 .withSortCapability(SortDimension.SORT_CAPABILITY_BOTH_DIRECTION)
56 .withDefaultSortDirection(SortDimension.SORT_DIRECTION_DESCENDING)
59 private static final SortDimension DIMENSION_3 = new SortDimension.Builder()
62 .withDataType(SortDimension.DATA_TYPE_NUMBER)
63 .withSortCapability(SortDimension.SORT_CAPABILITY_NONE)
[all …]
DSortDimensionTest.java26 import com.android.documentsui.sorting.SortDimension.SortCapability;
27 import com.android.documentsui.sorting.SortDimension.SortDirection;
41 SortDimension.SORT_CAPABILITY_BOTH_DIRECTION;
43 SortDimension.SORT_DIRECTION_DESCENDING;
45 SortDimension.SORT_DIRECTION_ASCENDING;
46 private static final int DATA_TYPE = SortDimension.DATA_TYPE_NUMBER;
49 private SortDimension mDimension;
53 mDimension = new SortDimension.Builder() in setUp()
72 assertEquals(SortDimension.SORT_DIRECTION_NONE, mDimension.getSortDirection()); in testBuilder()
DSortingCursorWrapperTest.java138 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_names_ascending()
162 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_names_descending()
183 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizes_ascending()
206 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizes_descending()
241 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizesWithBucketing_ascending()
293 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizesWithBucketing_descending()
351 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_time_ascending()
388 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_time_descending()
407 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_ASCENDING); in testSort_type_ascending()
439 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_DESCENDING); in testSort_type_descending()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/sorting/
DSortModel.java36 import com.android.documentsui.sorting.SortDimension.SortDirection;
94 private final SparseArray<SortDimension> mDimensions;
97 private transient Consumer<SortDimension> mMetricRecorder;
101 private @Nullable SortDimension mSortedDimension;
104 SortModel(Collection<SortDimension> columns) { in SortModel()
107 for (SortDimension column : columns) { in SortModel()
126 public SortDimension getDimensionAt(int index) { in getDimensionAt()
130 public @Nullable SortDimension getDimensionById(int id) { in getDimensionById()
146 : SortDimension.SORT_DIRECTION_NONE; in getCurrentSortDirection()
164 void setMetricRecorder(Consumer<SortDimension> metricRecorder) { in setMetricRecorder()
[all …]
DSortDimension.java31 public class SortDimension implements Parcelable { class
76 private SortDimension(int id, @StringRes int labelId, @DataType int dataType, in SortDimension() method in SortDimension
106 @SortDimension.SortDirection int alternativeDirection = in getNextDirection()
107 (mDefaultSortDirection == SortDimension.SORT_DIRECTION_ASCENDING) in getNextDirection()
108 ? SortDimension.SORT_DIRECTION_DESCENDING in getNextDirection()
109 : SortDimension.SORT_DIRECTION_ASCENDING; in getNextDirection()
110 @SortDimension.SortDirection int direction = in getNextDirection()
133 if (o == null || !(o instanceof SortDimension)) { in equals()
141 SortDimension other = (SortDimension) o; in equals()
182 public static Parcelable.Creator<SortDimension> CREATOR =
[all …]
DDropdownSortWidgetController.java30 import com.android.documentsui.sorting.SortDimension.SortDirection;
83 SortDimension dimension = mModel.getDimensionAt(i); in populateMenuItems()
84 if (dimension.getSortCapability() != SortDimension.SORT_CAPABILITY_NONE) { in populateMenuItems()
112 SortDimension dimension = mModel.getDimensionById(item.getItemId()); in updateVisibility()
121 SortDimension dimension = mModel.getDimensionById(sortedId); in bindSortedDimension()
130 final SortDimension dimension = mModel.getDimensionById(sortedId); in bindSortDirection()
132 case SortDimension.SORT_DIRECTION_NONE: in bindSortDirection()
135 case SortDimension.SORT_DIRECTION_ASCENDING: in bindSortDirection()
138 case SortDimension.SORT_DIRECTION_DESCENDING: in bindSortDirection()
159 final SortDimension dimension = mModel.getDimensionById(item.getItemId()); in onSelectDimension()
[all …]
DHeaderCell.java33 import com.android.documentsui.sorting.SortDimension;
45 private @SortDimension.SortDirection int mCurDirection = SortDimension.SORT_DIRECTION_NONE;
61 void onBind(SortDimension dimension) { in onBind()
68 case SortDimension.DATA_TYPE_NUMBER: in onBind()
71 case SortDimension.DATA_TYPE_STRING: in onBind()
82 case SortDimension.SORT_DIRECTION_NONE: in onBind()
85 case SortDimension.SORT_DIRECTION_ASCENDING: in onBind()
89 case SortDimension.SORT_DIRECTION_DESCENDING: in onBind()
DSortingCursorWrapper.java41 Cursor cursor, SortDimension dimension, Lookup<String, String> fileTypeLookup) { in SortingCursorWrapper()
189 @SortDimension.SortDirection int direction) { in binarySort()
214 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
217 case SortDimension.SORT_DIRECTION_DESCENDING: in binarySort()
270 @SortDimension.SortDirection int direction) { in binarySort()
295 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
298 case SortDimension.SORT_DIRECTION_DESCENDING: in binarySort()
DTableHeaderController.java83 SortDimension dimension = mModel.getDimensionById(id); in bindCell()
89 && dimension.getSortCapability() != SortDimension.SORT_CAPABILITY_NONE) { in bindCell()
97 SortDimension dimension = (SortDimension) v.getTag(); in onCellClicked()
DSortController.java80 sortModel.setMetricRecorder((SortDimension dimension) -> { in create()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DSortDocumentUiTest.java23 import com.android.documentsui.sorting.SortDimension;
103 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByName_Descending_listMode()
113 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortBySize_Ascending_listMode()
123 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortBySize_Descending_listMode()
133 SortModel.SORT_DIMENSION_ID_DATE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortByModified_Ascending_listMode()
143 SortModel.SORT_DIMENSION_ID_DATE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByModified_Descending_listMode()
153 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortByType_Ascending_listMode()
163 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByType_Descending_listMode()
173 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByName_Descending_gridMode()
183 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortBySize_Ascending_gridMode()
[all …]
DFileManagementUiTest.java32 import com.android.documentsui.sorting.SortDimension;
154 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testCopyLargeAmountOfFiles()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/
DSortHeaderBot.java27 import static com.android.documentsui.sorting.SortDimension.SORT_DIRECTION_ASCENDING;
39 import com.android.documentsui.sorting.SortDimension;
40 import com.android.documentsui.sorting.SortDimension.SortDirection;
65 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortBy()
135 ? SortDimension.SORT_DIRECTION_DESCENDING in getDirection()
136 : SortDimension.SORT_DIRECTION_NONE; in getDirection()
176 ? SortDimension.SORT_DIRECTION_DESCENDING in getDirection()
177 : SortDimension.SORT_DIRECTION_NONE; in getDirection()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DAbstractActionHandlerTest.java36 import com.android.documentsui.sorting.SortDimension;
221 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testLoadChildrenDocuments()
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DDirectoryState.java26 import com.android.documentsui.sorting.SortDimension.SortDirection;
DDirectoryFragment.java102 import com.android.documentsui.sorting.SortDimension;
1092 final SortDimension curSortedDimension = in accept()