Home
last modified time | relevance | path

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

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/
DSortModelTest.java44 private static final SortDimension DIMENSION_1 = new SortDimension.Builder()
47 .withDataType(SortDimension.DATA_TYPE_STRING)
48 .withSortCapability(SortDimension.SORT_CAPABILITY_BOTH_DIRECTION)
49 .withDefaultSortDirection(SortDimension.SORT_DIRECTION_ASCENDING)
53 private static final SortDimension DIMENSION_2 = new SortDimension.Builder()
56 .withSortCapability(SortDimension.SORT_CAPABILITY_BOTH_DIRECTION)
57 .withDefaultSortDirection(SortDimension.SORT_DIRECTION_DESCENDING)
60 private static final SortDimension DIMENSION_3 = new SortDimension.Builder()
63 .withDataType(SortDimension.DATA_TYPE_NUMBER)
64 .withSortCapability(SortDimension.SORT_CAPABILITY_NONE)
[all …]
DSortDimensionTest.java27 import com.android.documentsui.sorting.SortDimension.SortCapability;
28 import com.android.documentsui.sorting.SortDimension.SortDirection;
42 SortDimension.SORT_CAPABILITY_BOTH_DIRECTION;
44 SortDimension.SORT_DIRECTION_DESCENDING;
46 SortDimension.SORT_DIRECTION_ASCENDING;
47 private static final int DATA_TYPE = SortDimension.DATA_TYPE_NUMBER;
50 private SortDimension mDimension;
54 mDimension = new SortDimension.Builder() in setUp()
73 assertEquals(SortDimension.SORT_DIRECTION_NONE, mDimension.getSortDirection()); in testBuilder()
DSortingCursorWrapperTest.java139 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_names_ascending()
163 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_names_descending()
184 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizes_ascending()
207 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizes_descending()
242 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizesWithBucketing_ascending()
294 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizesWithBucketing_descending()
352 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_time_ascending()
389 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_time_descending()
408 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_ASCENDING); in testSort_type_ascending()
440 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_DESCENDING); in testSort_type_descending()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/sorting/
DSortModel.java37 import com.android.documentsui.sorting.SortDimension.SortDirection;
85 private final SparseArray<SortDimension> mDimensions;
88 private transient Consumer<SortDimension> mMetricRecorder;
92 private @Nullable SortDimension mSortedDimension;
95 SortModel(Collection<SortDimension> columns) { in SortModel()
98 for (SortDimension column : columns) { in SortModel()
117 public SortDimension getDimensionAt(int index) { in getDimensionAt()
121 public @Nullable SortDimension getDimensionById(int id) { in getDimensionById()
137 : SortDimension.SORT_DIRECTION_NONE; in getCurrentSortDirection()
155 void setMetricRecorder(Consumer<SortDimension> metricRecorder) { in setMetricRecorder()
[all …]
DSortDimension.java32 public class SortDimension implements Parcelable { class
77 private SortDimension(int id, @StringRes int labelId, @DataType int dataType, in SortDimension() method in SortDimension
107 @SortDimension.SortDirection int alternativeDirection = in getNextDirection()
108 (mDefaultSortDirection == SortDimension.SORT_DIRECTION_ASCENDING) in getNextDirection()
109 ? SortDimension.SORT_DIRECTION_DESCENDING in getNextDirection()
110 : SortDimension.SORT_DIRECTION_ASCENDING; in getNextDirection()
111 @SortDimension.SortDirection int direction = in getNextDirection()
134 if (o == null || !(o instanceof SortDimension)) { in equals()
142 SortDimension other = (SortDimension) o; in equals()
183 public static final Parcelable.Creator<SortDimension> CREATOR =
[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()
DSortListFragment.java22 import com.android.documentsui.sorting.SortDimension.SortDirection;
66 SortDimension dimension = mModel.getDimensionAt(i); in setupSortingList()
67 if (dimension.getSortCapability() != SortDimension.SORT_CAPABILITY_NONE) { in setupSortingList()
82 private void addBothDirectionDimension(SortDimension source, boolean ascendingFirst) { in addBothDirectionDimension()
84 SortDimension.SORT_DIRECTION_ASCENDING, in addBothDirectionDimension()
85 getSheetLabelId(source, SortDimension.SORT_DIRECTION_ASCENDING)); in addBothDirectionDimension()
87 SortDimension.SORT_DIRECTION_DESCENDING, in addBothDirectionDimension()
88 getSheetLabelId(source, SortDimension.SORT_DIRECTION_DESCENDING)); in addBothDirectionDimension()
93 …public static @StringRes int getSheetLabelId(SortDimension dimension, @SortDirection int direction… in getSheetLabelId()
94 boolean isAscending = direction == SortDimension.SORT_DIRECTION_ASCENDING; in getSheetLabelId()
[all …]
DSortingCursorWrapper.java41 Cursor cursor, SortDimension dimension, Lookup<String, String> fileTypeLookup) { in SortingCursorWrapper()
188 @SortDimension.SortDirection int direction) { in binarySort()
213 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
216 case SortDimension.SORT_DIRECTION_DESCENDING: in binarySort()
269 @SortDimension.SortDirection int direction) { in binarySort()
294 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
297 case SortDimension.SORT_DIRECTION_DESCENDING: in binarySort()
DTableHeaderController.java82 SortDimension dimension = mModel.getDimensionById(id); in bindCell()
88 && dimension.getSortCapability() != SortDimension.SORT_CAPABILITY_NONE) { in bindCell()
96 SortDimension dimension = (SortDimension) v.getTag(); in onCellClicked()
DSortController.java68 sortModel.setMetricRecorder((SortDimension dimension) -> { in create()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DSortDocumentUiTest.java24 import com.android.documentsui.sorting.SortDimension;
104 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByName_Descending_listMode()
114 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortBySize_Ascending_listMode()
124 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortBySize_Descending_listMode()
134 SortModel.SORT_DIMENSION_ID_DATE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortByModified_Ascending_listMode()
144 SortModel.SORT_DIMENSION_ID_DATE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByModified_Descending_listMode()
154 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortByType_Ascending_listMode()
164 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByType_Descending_listMode()
174 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_DESCENDING); in testSortByName_Descending_gridMode()
184 SortModel.SORT_DIMENSION_ID_SIZE, SortDimension.SORT_DIRECTION_ASCENDING); in testSortBySize_Ascending_gridMode()
[all …]
DFileManagementUiTest.java34 import com.android.documentsui.sorting.SortDimension;
159 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testCopyLargeAmountOfFiles()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/
DSortBot.java28 import static com.android.documentsui.sorting.SortDimension.SORT_DIRECTION_ASCENDING;
44 import com.android.documentsui.sorting.SortDimension;
45 import com.android.documentsui.sorting.SortDimension.SortDirection;
70 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortBy()
105 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortByMenu()
110 SortDimension dimension = mSortModel.getDimensionById(id); in sortByMenu()
165 ? SortDimension.SORT_DIRECTION_DESCENDING in getDirection()
166 : SortDimension.SORT_DIRECTION_NONE; in getDirection()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DGlobalSearchLoaderTest.java33 import com.android.documentsui.sorting.SortDimension;
250 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeSearchString()
284 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeDifferentRoot()
316 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeCurrentUserRootOnly()
354 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeBothUsersRoots()
383 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_emptyCurrentUsersRoot()
DAbstractActionHandlerTest.java42 import com.android.documentsui.sorting.SortDimension;
289 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testLoadChildrenDocuments()
318 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testCrossProfileDocuments_success()
416 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testCrossProfileDocuments_reloadSuccessAfterCrossProfileError()
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DDirectoryState.java25 import com.android.documentsui.sorting.SortDimension.SortDirection;
DDirectoryFragment.java113 import com.android.documentsui.sorting.SortDimension;
1465 final SortDimension curSortedDimension = in accept()