/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/extensions/ |
D | Intent.kt | 72 val mimeTypes: Array<String>? = getStringArrayExtra(Intent.EXTRA_MIME_TYPES) in Intent() constant 73 if (mimeTypes != null) { in Intent() 74 if (mimeTypes.all { mimeType -> isMediaMimeType(mimeType) }) { in Intent() 75 return mimeTypes.toCollection(ArrayList()) in Intent() 82 "Only media MIME types can be accepted. Input MIME types: $mimeTypes" in Intent() 105 val mimeTypes = getStringArrayExtra(Intent.EXTRA_MIME_TYPES) in canHandleGetContentIntentMimeTypes() constant 106 mimeTypes?.let { in canHandleGetContentIntentMimeTypes() 110 if (mimeTypes.size == 0) return false in canHandleGetContentIntentMimeTypes() 113 for (mimeType in mimeTypes) { in canHandleGetContentIntentMimeTypes()
|
/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/data/paging/ |
D | MediaProviderClientTest.kt | 96 val mimeTypes: List<String> = mutableListOf("image/gif", "video/*") in <lambda>() constant 98 intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes.toTypedArray()) in <lambda>() 110 .isEqualTo(mimeTypes) in <lambda>() 128 val mimeTypes: List<String> = mutableListOf("image/gif", "video/*") in testRefreshLocalOnlyMedia() constant 130 intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes.toTypedArray()) in testRefreshLocalOnlyMedia() 147 .isEqualTo(mimeTypes) in testRefreshLocalOnlyMedia() 167 val mimeTypes: List<String> = mutableListOf("image/gif", "video/*") in <lambda>() constant 169 intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes.toTypedArray()) in <lambda>() 187 .isEqualTo(mimeTypes) in <lambda>() 245 val mimeTypes: List<String> = mutableListOf("image/*", "video/mp4", "image/gif") in testGetMimeTypeFromIntentActionPickImages() constant [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/ |
D | ItemsProvider.java | 124 @Nullable String[] mimeTypes, in getAllItems() argument 129 return queryMedia(URI_MEDIA_ALL, pagingParameters, mimeTypes, category, userId, in getAllItems() 162 @Nullable String[] mimeTypes, in getLocalItems() argument 167 return queryMedia(URI_MEDIA_LOCAL, pagingParameters, mimeTypes, category, userId, in getLocalItems() 190 @Nullable String[] mimeTypes, in getItemsForPreselectedMedia() argument 197 new PaginationParameters(), mimeTypes, category, userId, in getItemsForPreselectedMedia() 216 public Cursor getAllCategories(@Nullable String[] mimeTypes, @Nullable UserId userId, in getAllCategories() argument 220 return queryAlbums(URI_ALBUMS_ALL, mimeTypes, userId, cancellationSignal); in getAllCategories() 239 public Cursor getLocalCategories(@Nullable String[] mimeTypes, @Nullable UserId userId, in getLocalCategories() argument 243 return queryAlbums(URI_ALBUMS_LOCAL, mimeTypes, userId, cancellationSignal); in getLocalCategories() [all …]
|
D | CloudProviderQueryExtras.java | 85 private CloudProviderQueryExtras(String albumId, String albumAuthority, String[] mimeTypes, in CloudProviderQueryExtras() argument 92 mMimeTypes = mimeTypes; in CloudProviderQueryExtras() 119 final String[] mimeTypes = bundle.getStringArray(MediaStore.QUERY_ARG_MIME_TYPE); in fromMediaStoreBundle() local 140 return new CloudProviderQueryExtras(albumId, albumAuthority, mimeTypes, sizeBytes, in fromMediaStoreBundle() 153 final String[] mimeTypes = bundle.getStringArray( in fromCloudMediaBundle() local 175 return new CloudProviderQueryExtras(albumId, albumAuthority, mimeTypes, sizeBytes, in fromCloudMediaBundle()
|
D | PickerDbFacade.java | 724 String albumId, long sizeBytes, String[] mimeTypes, boolean isFavorite, in QueryFilter() argument 734 this.mMimeTypes = mimeTypes; in QueryFilter() 763 private String[] mimeTypes = STRING_ARRAY_DEFAULT; field in PickerDbFacade.QueryFilterBuilder 814 public QueryFilterBuilder setMimeTypes(String[] mimeTypes) { in setMimeTypes() argument 815 this.mimeTypes = mimeTypes; in setMimeTypes() 890 sizeBytes, mimeTypes, isFavorite, mIsVideo, mIsLocalOnly, in build() 1114 String[] mimeTypes = query.mMimeTypes; in hideVideosAlbum() local 1115 if (!albumId.equals(ALBUM_ID_VIDEOS) || mimeTypes == null) { in hideVideosAlbum() 1118 for (String mimeType : mimeTypes) { in hideVideosAlbum() 1503 List<String> selectionArgs, String[] mimeTypes) { in addMimeTypesToQueryBuilderAndSelectionArgs() argument [all …]
|
D | ExternalDbFacade.java | 297 public Cursor queryMedia(long generation, String albumId, String[] mimeTypes, int pageSize, 317 selectionArgs.addAll(appendWhere(qb, albumId, mimeTypes)); 468 public Cursor queryAlbums(String[] mimeTypes) { 475 selectionArgs.addAll(appendWhere(qb, albumId, mimeTypes)); 513 String[] mimeTypes) { 516 addMimeTypesToQueryBuilderAndSelectionArgs(qb, selectionArgs, mimeTypes);
|
D | PickerResult.java | 60 String[] mimeTypes = new String[]{"image/*", "video/*"}; in getPickerResponseIntent() local 61 final ClipData clipData = new ClipData(null /* label */, mimeTypes, in getPickerResponseIntent()
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/ |
D | PickerProviderMediaGenerator.java | 101 long generation, String albumId, String[] mimeTypes, long sizeBytes, int pageSize) { in getMedia() argument 102 return getMedia(generation, albumId, mimeTypes, sizeBytes, null, pageSize); in getMedia() 108 String[] mimeTypes, in getMedia() argument 117 mimeTypes, in getMedia() 138 public Cursor getAlbums(String[] mimeTypes, long sizeBytes, boolean isLocal) { in getAlbums() argument 139 return getAlbums(mimeTypes, sizeBytes, isLocal, /* pageToken= */ null); in getAlbums() 143 String[] mimeTypes, long sizeBytes, boolean isLocal, String pageToken) { in getAlbums() argument 144 final Cursor cursor = getCursor(mAlbums, mimeTypes, sizeBytes, isLocal, pageToken); in getAlbums() 319 String[] mimeTypes, in getCursor() argument 349 && matchesFilter(media, albumId, mimeTypes, sizeBytes)) { in getCursor() [all …]
|
D | MediaGrantsTest.java | 122 String[] mimeTypes = {PNG_MIME_TYPE}; in testGetMediaGrantsForPackages() local 126 new String[]{TEST_OWNER_PACKAGE_NAME}, TEST_USER_ID, mimeTypes, volumes)); in testGetMediaGrantsForPackages() 136 new String[]{TEST_OWNER_PACKAGE_NAME2}, TEST_USER_ID, mimeTypes, volumes)); in testGetMediaGrantsForPackages() 146 new String[]{"non.existent.package"}, TEST_USER_ID, mimeTypes, volumes)); in testGetMediaGrantsForPackages() 160 String[] mimeTypes = {PNG_MIME_TYPE}; in test_GetMediaGrantsForPackages_excludesIsTrashed() local 166 new String[]{TEST_OWNER_PACKAGE_NAME}, TEST_USER_ID, mimeTypes, volumes)); in test_GetMediaGrantsForPackages_excludesIsTrashed() 185 String[] mimeTypes = {PNG_MIME_TYPE}; in test_GetMediaGrantsForPackages_excludesIsPending() local 191 new String[]{TEST_OWNER_PACKAGE_NAME}, TEST_USER_ID, mimeTypes, volumes)); in test_GetMediaGrantsForPackages_excludesIsPending() 217 String[] mimeTypes = {PNG_MIME_TYPE}; in test_GetMediaGrantsForPackages_testMimeTypeFilter() local 220 new String[]{TEST_OWNER_PACKAGE_NAME}, TEST_USER_ID, mimeTypes, volumes)); in test_GetMediaGrantsForPackages_testMimeTypeFilter() [all …]
|
D | MediaDocumentsProviderTest.java | 216 final String[] mimeTypes = new String[] {"text/csv", "video/*", "image/png", "audio/*"}; in testBuildSearchSelection() local 228 displayName, mimeTypes, lastModifiedAfter, fileSizeOver, columnDisplayName, in testBuildSearchSelection() 234 assertMimeType(mimeTypes[1], selectionPair.second[1]); in testBuildSearchSelection() 235 assertMimeType(mimeTypes[3], selectionPair.second[2]); in testBuildSearchSelection() 236 assertMimeType(mimeTypes[0], selectionPair.second[3]); in testBuildSearchSelection() 237 assertMimeType(mimeTypes[2], selectionPair.second[4]); in testBuildSearchSelection()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | DocumentInfoTest.java | 132 final Set<String> mimeTypes = new HashSet<>(); in testFolderMimeTypeFromUri() local 133 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFolderMimeTypeFromUri() 135 assertThat(mimeTypes.size()).isEqualTo(1); in testFolderMimeTypeFromUri() 137 assertThat(mimeTypes.contains(DocumentsContract.Document.MIME_TYPE_DIR)).isTrue(); in testFolderMimeTypeFromUri() 145 final Set<String> mimeTypes = new HashSet<>(); in testFileMimeTypeFromUri() local 146 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFileMimeTypeFromUri() 148 assertThat(mimeTypes.size()).isEqualTo(1); in testFileMimeTypeFromUri() 150 assertThat(mimeTypes.contains("text/plain")).isTrue(); in testFileMimeTypeFromUri()
|
D | StateTest.java | 114 final String[] mimeTypes = { "audio/mp3", "video/mp4" }; in testPhotoPicking_noImageType() local 115 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_noImageType() 124 final String[] mimeTypes = { "image/gif", "image/jpg", "audio/mp3" }; in testPhotoPicking_oneIsNotImageType() local 125 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_oneIsNotImageType() 142 final String[] mimeTypes = null; in testPhotoPicking_nullExrta() local 143 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_nullExrta()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | RootInfo.java | 100 public String mimeTypes; field in RootInfo 126 mimeTypes = null; in reset() 155 mimeTypes = DurableUtils.readNullableString(in); in read() 176 DurableUtils.writeNullableString(out, mimeTypes); in write() 217 newRoot.mimeTypes = root.mimeTypes; in copyRootInfo() 238 root.mimeTypes = getCursorString(cursor, Root.COLUMN_MIME_TYPES); in fromRootsCursor() 245 derivedMimeTypes = (mimeTypes != null) ? mimeTypes.split("\n") : null; in deriveFields()
|
D | MimeTypes.java | 133 public static String findCommonMimeType(List<String> mimeTypes) { in findCommonMimeType() argument 134 String[] commonType = splitMimeType(mimeTypes.get(0)); in findCommonMimeType() 139 for (int i = 1; i < mimeTypes.size(); i++) { in findCommonMimeType() 140 String[] type = mimeTypes.get(i).split("/"); in findCommonMimeType()
|
D | DocumentInfo.java | 442 public static void addMimeTypes(ContentResolver resolver, Uri uri, Set<String> mimeTypes) { in addMimeTypes() argument 447 mimeTypes.add(type); in addMimeTypes() 455 mimeTypes.addAll(Arrays.asList(streamTypes)); in addMimeTypes()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaGrants.java | 162 String[] mimeTypes, String[] availableVolumes) in getMediaGrantsForPackages() argument 176 .setMimeTypeSelection(mimeTypes) in getMediaGrantsForPackages() 435 List<String> selectionArgs, String[] mimeTypes) { 436 if (mimeTypes == null) { 440 mimeTypes = replaceMatchAnyChar(mimeTypes); 442 for (String mimeType : mimeTypes) {
|
D | MediaDocumentsProvider.java | 294 String[] mimeTypes, long lastModifiedAfter, long fileSizeOver, String columnDisplayName, in buildSearchSelection() argument 322 if (mimeTypes != null && mimeTypes.length > 0) { in buildSearchSelection() 331 for (int i = 0; i < mimeTypes.length; ++i) { in buildSearchSelection() 332 final String mimeType = mimeTypes[i]; in buildSearchSelection() 392 private static boolean shouldFilterMimeType(String[] mimeTypes, String filter, in shouldFilterMimeType() argument 396 if (mimeTypes != null) { in shouldFilterMimeType() 397 for (int i = 0; i < mimeTypes.length; i++) { in shouldFilterMimeType() 400 if (TextUtils.equals(mimeTypes[i], "*/*") || in shouldFilterMimeType() 401 TextUtils.equals(mimeTypes[i], filter)) { in shouldFilterMimeType() 406 if (MimeTypeFilter.matches(mimeTypes[i], filter)) { in shouldFilterMimeType() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/queries/ |
D | SearchChipData.java | 29 public SearchChipData(int chipType, int titleRes, String[] mimeTypes) { in SearchChipData() argument 32 mMimeTypes = mimeTypes; in SearchChipData()
|
D | SearchChipViewManager.java | 234 final String[] mimeTypes = chipData.getMimeTypes(); in initChipSets() local 235 final boolean isMatched = MimeTypes.mimeMatches(acceptMimeTypes, mimeTypes); in initChipSets() 258 final String[] mimeTypes = chipData.getMimeTypes(); in updateChips() local 259 final boolean isMatched = MimeTypes.mimeMatches(acceptMimeTypes, mimeTypes); in updateChips()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/roots/ |
D | ProvidersAccessTest.java | 198 private static RootInfo buildForMimeTypes(String... mimeTypes) { in buildForMimeTypes() argument 199 return buildForMimeTypes(UserId.DEFAULT_USER, mimeTypes); in buildForMimeTypes() 202 private static RootInfo buildForMimeTypes(UserId userId, String... mimeTypes) { in buildForMimeTypes() argument 205 root.derivedMimeTypes = mimeTypes; in buildForMimeTypes()
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/exportimport/ |
D | DocumentProvidersManager.java | 143 String mimeTypes = mimeTypesIndex != -1 ? cursor.getString(mimeTypesIndex) : null; in isDocumentProviderSupported() local 144 if (mimeTypes != null) { in isDocumentProviderSupported() 145 return mimeTypes.lines().anyMatch(s -> s.equalsIgnoreCase(REQUIRED_MIME_TYPE)); in isDocumentProviderSupported()
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | GalleryBoundCursorLoader.java | 49 private static String createSelection(final String[] mimeTypes, Integer[] mediaTypes) { in createSelection() argument 50 return MediaColumns.MIME_TYPE + " IN ('" + Joiner.on("','").join(mimeTypes) + "') AND " in createSelection()
|
/packages/modules/HealthFitness/tests/integrationtests/utils/HealthConnectDocumentProviderTestUtils/src/android/healthconnect/tests/documentprovider/utils/ |
D | DocumentProviderRoot.java | 110 public DocumentProviderRoot setMimeTypes(String mimeTypes) { in setMimeTypes() argument 111 mMimeTypes = mimeTypes; in setMimeTypes()
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadStorageProvider.java | 135 static void onMediaProviderDownloadsDelete(Context context, long[] ids, String[] mimeTypes) { in onMediaProviderDownloadsDelete() argument 137 final boolean isDir = mimeTypes[i] == null; in onMediaProviderDownloadsDelete() 1030 final String[] mimeTypes = queryArgs.getStringArray( in buildSearchSelection() local 1032 if (mimeTypes != null && mimeTypes.length > 0) { in buildSearchSelection() 1041 for (int i = 0; i < mimeTypes.length; ++i) { in buildSearchSelection() 1042 final String mimeType = mimeTypes[i]; in buildSearchSelection()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/queries/ |
D | SearchViewManagerTest.java | 393 final String[] mimeTypes = queryArgs.getStringArray(QUERY_ARG_MIME_TYPES); in testBuildQueryArgs_hasMimeType() local 394 assertTrue(mimeTypes.length > 0); in testBuildQueryArgs_hasMimeType() 395 assertEquals("image/*", mimeTypes[0]); in testBuildQueryArgs_hasMimeType()
|