Home
last modified time | relevance | path

Searched refs:mimeType (Results 1 – 25 of 205) sorted by relevance

123456789

/packages/providers/MediaProvider/src/com/android/providers/media/util/
DMimeUtils.java58 final String mimeType = MimeTypeMap.getSingleton() in resolveMimeType()
60 if (mimeType == null) return ClipDescription.MIMETYPE_UNKNOWN; in resolveMimeType()
62 return mimeType; in resolveMimeType()
70 public static int resolveMediaType(@NonNull String mimeType) { in resolveMediaType() argument
71 if (isPlaylistMimeType(mimeType)) { in resolveMediaType()
73 } else if (isSubtitleMimeType(mimeType)) { in resolveMediaType()
75 } else if (isAudioMimeType(mimeType)) { in resolveMediaType()
77 } else if (isVideoMimeType(mimeType)) { in resolveMediaType()
79 } else if (isImageMimeType(mimeType)) { in resolveMediaType()
81 } else if (isDocumentMimeType(mimeType)) { in resolveMediaType()
[all …]
/packages/apps/TV/tuner/src/com/google/android/exoplayer/
DMediaSoftwareCodecUtil.java51 public static DecoderInfo getSoftwareDecoderInfo(String mimeType, boolean secure) in getSoftwareDecoderInfo() argument
55 getMediaSoftwareCodecInfo(mimeType, secure); in getSoftwareDecoderInfo()
64 getMediaSoftwareCodecInfo(String mimeType, boolean secure) in getMediaSoftwareCodecInfo() argument
66 CodecKey key = new CodecKey(mimeType, secure); in getMediaSoftwareCodecInfo()
81 + mimeType in getMediaSoftwareCodecInfo()
102 String mimeType = key.mimeType; in getMediaSoftwareCodecInfoInternal() local
114 if (supportedType.equalsIgnoreCase(mimeType)) { in getMediaSoftwareCodecInfoInternal()
119 key.mimeType, capabilities); in getMediaSoftwareCodecInfoInternal()
124 key.secure ? new CodecKey(mimeType, false) : key, in getMediaSoftwareCodecInfoInternal()
128 key.secure ? key : new CodecKey(mimeType, true), in getMediaSoftwareCodecInfoInternal()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/archives/
DArchiveHandle.java87 @NonNull String mimeType, in ArchiveHandle() argument
90 mMimeType = mimeType; in ArchiveHandle()
186 SevenZFileHandle(ParcelFileDescriptor parcelFileDescriptor, String mimeType, in SevenZFileHandle() argument
188 super(parcelFileDescriptor, mimeType, commonArchive); in SevenZFileHandle()
215 ZipFileHandle(ParcelFileDescriptor parcelFileDescriptor, String mimeType, in ZipFileHandle() argument
217 super(parcelFileDescriptor, mimeType, commonArchive); in ZipFileHandle()
238 String mimeType, ArchiveInputStream commonArchive) { in CommonArchiveInputHandle() argument
239 super(parcelFileDescriptor, mimeType, commonArchive); in CommonArchiveInputHandle()
270 @NonNull String mimeType) throws CompressorException, ArchiveException { in createCommonArchive() argument
273 String compressName = ArchiveRegistry.getCompressName(mimeType); in createCommonArchive()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/dataitem/
DDataItem.java58 final String mimeType = values.getAsString(Data.MIMETYPE); in createFrom() local
59 if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
61 } else if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
63 } else if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
65 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
67 } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
69 } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
71 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
73 } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
75 } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/model/dataitem/
DDataItem.java57 final String mimeType = values.getAsString(Data.MIMETYPE); in createFrom() local
58 if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
60 } else if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
62 } else if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
64 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
66 } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
68 } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
70 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
72 } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
74 } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom()
[all …]
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadStorageProvider.java202 public String createDocument(String parentDocId, String mimeType, String displayName) in createDocument() argument
207 String newDocumentId = super.createDocument(parentDocId, mimeType, displayName); in createDocument()
208 if (!Document.MIME_TYPE_DIR.equals(mimeType) in createDocument()
213 newFile.getName(), newFile.getName(), true, mimeType, in createDocument()
403 final String mimeType = cursor.getString( in queryRecentDocuments() local
411 if (mimeType == null || (MediaFile.isImageMimeType(mimeType) in queryRecentDocuments()
412 || MediaFile.isVideoMimeType(mimeType) || MediaFile.isDocumentMimeType( in queryRecentDocuments()
413 mimeType)) && !TextUtils.isEmpty(uri)) { in queryRecentDocuments()
489 final String mimeType = rawFilesCursor.getString( in includeSearchFilesFromSharedStorage() local
494 if (!shouldExcludeMedia || !isMediaMimeType(mimeType)) { in includeSearchFilesFromSharedStorage()
[all …]
DHelpers.java237 String contentDisposition, String contentLocation, String mimeType, int destination) in generateSaveFile() argument
265 if (DownloadDrmHelper.isDrmConvertNeeded(mimeType)) { in generateSaveFile()
287 suffix = chooseExtensionFromMimeType(mimeType, true); in generateSaveFile()
290 suffix = chooseExtensionFromFilename(mimeType, destination, name, dotIndex); in generateSaveFile()
384 private static String chooseExtensionFromMimeType(String mimeType, boolean useDefaults) { in chooseExtensionFromMimeType() argument
386 if (mimeType != null) { in chooseExtensionFromMimeType()
387 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in chooseExtensionFromMimeType()
395 Log.v(Constants.TAG, "couldn't find extension for " + mimeType); in chooseExtensionFromMimeType()
400 if (mimeType != null && mimeType.toLowerCase().startsWith("text/")) { in chooseExtensionFromMimeType()
401 if (mimeType.equalsIgnoreCase("text/html")) { in chooseExtensionFromMimeType()
[all …]
DDownloadScanner.java53 public final String mimeType; field in DownloadScanner.ScanRequest
56 public ScanRequest(long id, String path, String mimeType) { in ScanRequest() argument
59 this.mimeType = mimeType; in ScanRequest()
64 conn.scanFile(path, mimeType); in exec()
82 public static void requestScanBlocking(Context context, long id, String path, String mimeType) { in requestScanBlocking() argument
85 scanner.requestScan(new ScanRequest(id, path, mimeType)); in requestScanBlocking()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/
DStubProvider.java210 public String createDocument(String parentId, String mimeType, String displayName) in createDocument() argument
213 File file = createFile(parent, mimeType, displayName); in createDocument()
215 final StubDocument document = StubDocument.createRegularDocument(file, mimeType, parent); in createDocument()
337 StubDocument newDoc = StubDocument.createRegularDocument(after, oldDoc.mimeType, in renameDocument()
411 for (final String mimeType : document.streamTypes) { in openTypedDocument()
414 if (mimeType.equals(mimeTypeFilter)) { in openTypedDocument()
572 String mimeType = extras.getString(Document.COLUMN_MIME_TYPE); in dispatchCreateDocumentWithFlags() local
580 documentId = createDocument(rootId, mimeType, name, flags, streamTypes); in dispatchCreateDocumentWithFlags()
605 public String createDocument(String parentId, String mimeType, String displayName, int flags, in createDocument() argument
609 File file = createFile(parent, mimeType, displayName); in createDocument()
[all …]
/packages/apps/Contacts/src/com/android/contacts/model/
DRawContactModifier.java90 final int visibleCount = state.getMimeEntriesCount(kind.mimeType, true); in canInsert()
112 RawContactDelta state, AccountType accountType, String mimeType) { in ensureKindExists() argument
113 final DataKind kind = accountType.getKindForMimetype(mimeType); in ensureKindExists()
114 final boolean hasChild = state.getMimeEntriesCount(mimeType, true) > 0; in ensureKindExists()
119 return state.getMimeEntries(mimeType).get(0); in ensureKindExists()
123 if (kind.mimeType.equals(Photo.CONTENT_ITEM_TYPE)) { in ensureKindExists()
194 final List<ValuesDelta> mimeEntries = state.getMimeEntries(kind.mimeType); in getTypeFrequencies()
352 after.put(Data.MIMETYPE, kind.mimeType); in insertChild()
418 final String mimeType = kind.mimeType; in trimEmpty() local
419 final ArrayList<ValuesDelta> entries = state.getMimeEntries(mimeType); in trimEmpty()
[all …]
DRawContactDelta.java155 public ValuesDelta getPrimaryEntry(String mimeType) { in getPrimaryEntry() argument
156 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getPrimaryEntry()
173 public ValuesDelta getSuperPrimaryEntry(String mimeType) { in getSuperPrimaryEntry() argument
174 return getSuperPrimaryEntry(mimeType, true); in getSuperPrimaryEntry()
183 public ValuesDelta getSuperPrimaryEntry(String mimeType, boolean forceSelection) { in getSuperPrimaryEntry() argument
184 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getSuperPrimaryEntry()
249 private ArrayList<ValuesDelta> getMimeEntries(String mimeType, boolean lazyCreate) { in getMimeEntries() argument
250 ArrayList<ValuesDelta> mimeEntries = mEntries.get(mimeType); in getMimeEntries()
253 mEntries.put(mimeType, mimeEntries); in getMimeEntries()
258 public ArrayList<ValuesDelta> getMimeEntries(String mimeType) { in getMimeEntries() argument
[all …]
/packages/apps/Camera2/src/com/android/camera/
DStorage.java131 int height, String mimeType) throws IOException { in addImage() argument
136 bitmap, width, height, mimeType, exif); in addImage()
161 int height, String mimeType, ExifInterface exif) { in addImageToMediaStore() argument
163 ContentValues values = getContentValuesForData(title, date, location, mimeType, true); in addImageToMediaStore()
201 String mimeType, boolean isPending) { in getContentValuesForData() argument
207 values.put(Media.MIME_TYPE, mimeType); in getContentValuesForData()
294 byte[] jpeg, int width, int height, String mimeType) throws IOException { in updateImage() argument
297 bitmap, width, height, mimeType, exif); in updateImage()
360 Bitmap bitmap, int width, int height, String mimeType, ExifInterface exif) { in updateImage() argument
366 jpegLength, bitmap, width, height, mimeType, exif); in updateImage()
[all …]
/packages/apps/Dialer/java/com/android/dialer/callcomposer/
DGalleryGridItemData.java40 private String mimeType; field in GalleryGridItemData
47 mimeType = Assert.isNotNull(copyData.getMimeType()); in GalleryGridItemData()
56 mimeType = Assert.isNotNull(cursor.getString(INDEX_MIME_TYPE)); in bind()
78 return mimeType; in getMimeType()
84 && Objects.equals(mimeType, ((GalleryGridItemData) obj).mimeType) in equals()
91 return Objects.hash(filePath, mimeType, dateModifiedSeconds); in hashCode()
102 dest.writeString(mimeType); in writeToParcel()
121 mimeType = in.readString(); in GalleryGridItemData()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DBitmapUtils.java247 public static boolean isSupportedByRegionDecoder(String mimeType) { in isSupportedByRegionDecoder() argument
248 if (mimeType == null) return false; in isSupportedByRegionDecoder()
249 mimeType = mimeType.toLowerCase(); in isSupportedByRegionDecoder()
250 return mimeType.startsWith("image/") && in isSupportedByRegionDecoder()
251 (!mimeType.equals("image/gif") && !mimeType.endsWith("bmp")); in isSupportedByRegionDecoder()
254 public static boolean isRotationSupported(String mimeType) { in isRotationSupported() argument
255 if (mimeType == null) return false; in isRotationSupported()
256 mimeType = mimeType.toLowerCase(); in isRotationSupported()
257 return mimeType.equals("image/jpeg"); in isRotationSupported()
/packages/apps/StorageManager/src/com/android/storagemanager/utils/
DIconProvider.java42 public Drawable loadMimeIcon(String mimeType) { in loadMimeIcon() argument
43 return mContext.getContentResolver().getTypeInfo(mimeType).getIcon().loadDrawable(mContext); in loadMimeIcon()
51 final String mimeType = in getMimeType() local
53 if (mimeType != null) { in getMimeType()
54 return mimeType; in getMimeType()
61 String mimeType = getMimeType(file); in isImageType() local
62 return mimeType.startsWith("image/"); in isImageType()
/packages/providers/MediaProvider/src/com/android/providers/media/scan/
DModernMediaScanner.java750 final String mimeType = c.getString(3); in visitFile() local
781 && "audio/mp4".equalsIgnoreCase(mimeType)) { in visitFile()
824 File file, String mimeType, int defaultMediaType) { in mediaTypeFromMimeType() argument
825 if (mimeType != null) { in mediaTypeFromMimeType()
827 file, mimeType, /*isHidden*/ mHiddenDirCount > 0); in mediaTypeFromMimeType()
987 BasicFileAttributes attrs, String mimeType, int mediaType, String volumeName) { in scanItem() argument
994 return scanItemDirectory(existingId, file, attrs, mimeType, volumeName); in scanItem()
999 return scanItemAudio(existingId, file, attrs, mimeType, mediaType, volumeName); in scanItem()
1001 return scanItemVideo(existingId, file, attrs, mimeType, mediaType, volumeName); in scanItem()
1003 return scanItemImage(existingId, file, attrs, mimeType, mediaType, volumeName); in scanItem()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/audio/
DMediaCodecAudioDecoder.java58 public static boolean supportMimeType(MediaCodecSelector selector, String mimeType) { in supportMimeType() argument
62 return getDecoderInfo(selector, mimeType) != null; in supportMimeType()
65 private static DecoderInfo getDecoderInfo(MediaCodecSelector selector, String mimeType) { in getDecoderInfo() argument
67 return selector.getDecoderInfo(mimeType, false); in getDecoderInfo()
84 String mimeType = format.mimeType; in maybeInitDecoder() local
85 DecoderInfo decoderInfo = getDecoderInfo(mSelector, mimeType); in maybeInitDecoder()
87 Log.i(TAG, "There is not decoder found for " + mimeType); in maybeInitDecoder()
107 public void resetDecoderState(String mimeType) { in resetDecoderState() argument
DMpegTsDefaultAudioTrackRenderer.java158 private boolean handlesMimeType(String mimeType) { in handlesMimeType() argument
159 return mimeType.equals(MimeTypes.AUDIO_AC3) in handlesMimeType()
160 || mimeType.equals(MimeTypes.AUDIO_E_AC3) in handlesMimeType()
161 || mimeType.equals(MimeTypes.AUDIO_MPEG_L2) in handlesMimeType()
162 || MediaCodecAudioDecoder.supportMimeType(mSelector, mimeType); in handlesMimeType()
172 String mimeType = mSource.getFormat(i).mimeType; in doPrepare() local
173 if (MimeTypes.isAudio(mimeType) && handlesMimeType(mimeType)) { in doPrepare()
378 String mimeType = formatHolder.format.mimeType; in onInputFormatChanged() local
379 mUseFrameworkDecoder = MediaCodecAudioDecoder.supportMimeType(mSelector, mimeType); in onInputFormatChanged()
397 mMonitor.setEncoding(mimeType); in onInputFormatChanged()
/packages/apps/Contacts/src/com/android/contacts/quickcontact/
DResolveCache.java124 protected Entry getEntry(String mimeType, Intent intent) { in getEntry() argument
125 Entry entry = mCache.get(mimeType); in getEntry()
129 if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType) in getEntry()
155 mCache.put(mimeType, entry); in getEntry()
200 public boolean hasResolve(String mimeType, Intent intent) { in hasResolve() argument
201 return getEntry(mimeType, intent).bestResolve != null; in hasResolve()
209 public Drawable getIcon(String mimeType, Intent intent) { in getIcon() argument
210 return getEntry(mimeType, intent).icon; in getIcon()
DActionMultiMap.java27 public void put(String mimeType, Action info) { in put() argument
28 put(mimeType, info, false); in put()
35 public void put(String mimeType, Action info, boolean front) { in put() argument
37 ArrayList<Action> collectList = get(mimeType); in put()
42 put(mimeType, collectList); in put()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/
DMimeUtility.java220 String mimeType = part.getMimeType(); in getTextFromPart() local
221 if (mimeType != null && MimeUtility.mimeTypeMatches(mimeType, "text/*")) { in getTextFromPart()
280 public static boolean mimeTypeMatches(String mimeType, String matchAgainst) { in mimeTypeMatches() argument
282 return p.matcher(mimeType).matches(); in mimeTypeMatches()
294 public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) { in mimeTypeMatches() argument
296 if (mimeTypeMatches(mimeType, matchType)) { in mimeTypeMatches()
363 String mimeType = part.getMimeType().toLowerCase(); in collectParts() local
393 } else if (inline && (mimeType.startsWith("text") || (mimeType.startsWith("image")))) { in collectParts()
/packages/apps/Contacts/src/com/android/contacts/editor/
DRawContactEditorView.java604 : " dropped uneditable mimetype: " + dataKind.mimeType)); in parseRawContactDelta()
608 final String mimeType = dataKind.mimeType; in parseRawContactDelta() local
611 if (DataKind.PSEUDO_MIME_TYPE_NAME.equals(mimeType) || in parseRawContactDelta()
612 DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME.equals(mimeType)) { in parseRawContactDelta()
614 Log.v(TAG, "parse: " + i + " " + dataKind.mimeType + " dropped pseudo type"); in parseRawContactDelta()
621 if (CustomDataItem.MIMETYPE_CUSTOM_FIELD.equals(mimeType)) { in parseRawContactDelta()
623 Log.v(TAG, "parse: " + i + " " + dataKind.mimeType + " dropped custom field"); in parseRawContactDelta()
630 mKindSectionDataMap.put(mimeType, kindSectionData); in parseRawContactDelta()
631 mSortedMimetypes.add(mimeType); in parseRawContactDelta()
634 Log.v(TAG, "parse: " + i + " " + dataKind.mimeType + " " + in parseRawContactDelta()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/imap/
DVoicemailPayload.java21 private final String mimeType; field in VoicemailPayload
24 public VoicemailPayload(String mimeType, byte[] bytes) { in VoicemailPayload() argument
25 this.mimeType = mimeType; in VoicemailPayload()
34 return mimeType; in getMimeType()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DDocumentInfo.java63 public String mimeType; field in DocumentInfo
83 mimeType = null; in reset()
105 mimeType = DurableUtils.readNullableString(in); in read()
127 DurableUtils.writeNullableString(out, mimeType); in write()
179 this.mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE); in updateFromCursor()
239 + ", mimeType=" + mimeType in toString()
297 return Document.MIME_TYPE_DIR.equals(mimeType); in isDirectory()
301 return ArchivesProvider.isSupportedArchiveType(mimeType); in isArchive()
359 return userId.hashCode() + derivedUri.hashCode() + mimeType.hashCode(); in hashCode()
377 && Objects.equals(mimeType, other.mimeType); in equals()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/
DFileSampleExtractor.java141 String mimeType = mediaFormat.getString(android.media.MediaFormat.KEY_MIME); in createFormat() local
165 MimeTypes.AUDIO_RAW.equals(mimeType) ? C.ENCODING_PCM_16BIT : Format.NO_VALUE; in createFormat()
166 if (MimeTypes.isAudio(mimeType)) { in createFormat()
169 mimeType, in createFormat()
180 } else if(MimeTypes.isVideo(mimeType)) { in createFormat()
183 mimeType, in createFormat()
194 } else if(MimeTypes.isText(mimeType)) { in createFormat()
197 mimeType, in createFormat()
207 return Format.createSampleFormat(null, mimeType, durationUs); in createFormat()

123456789