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.java140 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_names_ascending()
164 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_names_descending()
185 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizes_ascending()
208 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizes_descending()
243 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_sizesWithBucketing_ascending()
295 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_sizesWithBucketing_descending()
353 SortDimension.SORT_DIRECTION_ASCENDING); in testSort_time_ascending()
390 SortDimension.SORT_DIRECTION_DESCENDING); in testSort_time_descending()
409 SortModel.SORT_DIMENSION_ID_FILE_TYPE, SortDimension.SORT_DIRECTION_ASCENDING); in testSort_type_ascending()
441 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;
95 private final SparseArray<SortDimension> mDimensions;
98 private transient Consumer<SortDimension> mMetricRecorder;
102 private @Nullable SortDimension mSortedDimension;
105 SortModel(Collection<SortDimension> columns) { in SortModel()
108 for (SortDimension column : columns) { in SortModel()
127 public SortDimension getDimensionAt(int index) { in getDimensionAt()
131 public @Nullable SortDimension getDimensionById(int id) { in getDimensionById()
147 : SortDimension.SORT_DIRECTION_NONE; in getCurrentSortDirection()
165 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;
67 SortDimension dimension = mModel.getDimensionAt(i); in setupSortingList()
68 if (dimension.getSortCapability() != SortDimension.SORT_CAPABILITY_NONE) { in setupSortingList()
86 private void addBothDirectionDimension(SortDimension source, boolean ascendingFirst) { in addBothDirectionDimension()
88 SortDimension.SORT_DIRECTION_ASCENDING, in addBothDirectionDimension()
89 getSheetLabelId(source, SortDimension.SORT_DIRECTION_ASCENDING)); in addBothDirectionDimension()
91 SortDimension.SORT_DIRECTION_DESCENDING, in addBothDirectionDimension()
92 getSheetLabelId(source, SortDimension.SORT_DIRECTION_DESCENDING)); in addBothDirectionDimension()
97 …public static @StringRes int getSheetLabelId(SortDimension dimension, @SortDirection int direction… in getSheetLabelId()
98 boolean isAscending = direction == SortDimension.SORT_DIRECTION_ASCENDING; in getSheetLabelId()
[all …]
DSortingCursorWrapper.java42 Cursor cursor, SortDimension dimension, Lookup<String, String> fileTypeLookup) { in SortingCursorWrapper()
200 @SortDimension.SortDirection int direction) { in binarySort()
225 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
228 case SortDimension.SORT_DIRECTION_DESCENDING: in binarySort()
281 @SortDimension.SortDirection int direction) { in binarySort()
306 case SortDimension.SORT_DIRECTION_ASCENDING: in binarySort()
309 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.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;
71 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortBy()
106 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortByMenu()
111 SortDimension dimension = mSortModel.getDimensionById(id); in sortByMenu()
166 ? SortDimension.SORT_DIRECTION_DESCENDING in getDirection()
167 : SortDimension.SORT_DIRECTION_NONE; in getDirection()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DGlobalSearchLoaderTest.java34 import com.android.documentsui.sorting.SortDimension;
223 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeSearchString()
257 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeDifferentRoot()
289 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeCurrentUserRootOnly()
323 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_includeBothUsersRoots()
352 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testSearchResult_emptyCurrentUsersRoot()
DAbstractActionHandlerTest.java43 import com.android.documentsui.sorting.SortDimension;
264 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testLoadChildrenDocuments()
289 SortModel.SORT_DIMENSION_ID_TITLE, SortDimension.SORT_DIRECTION_ASCENDING); in testCrossProfileDocuments_success()
383 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.java111 import com.android.documentsui.sorting.SortDimension;
1401 final SortDimension curSortedDimension = in accept()