Home
last modified time | relevance | path

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

123456789

/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/apps/UnifiedEmail/src/com/android/mail/print/
DPrintUtils.java303 private static String getIconFilename(String mimeType) { in getIconFilename() argument
304 if (mimeType.startsWith("application/msword") || in getIconFilename()
305 mimeType.startsWith("application/vnd.oasis.opendocument.text") || in getIconFilename()
306 mimeType.equals("application/rtf") || in getIconFilename()
307 mimeType.equals("application/" in getIconFilename()
310 } else if (mimeType.startsWith("image/")) { in getIconFilename()
312 } else if (mimeType.startsWith("text/html")) { in getIconFilename()
314 } else if (mimeType.startsWith("application/pdf")) { in getIconFilename()
316 } else if (mimeType.endsWith("powerpoint") || in getIconFilename()
317 mimeType.equals("application/vnd.oasis.opendocument.presentation") || in getIconFilename()
[all …]
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/
DStubProvider.java190 public String createDocument(String parentId, String mimeType, String displayName) in createDocument() argument
193 File file = createFile(parent, mimeType, displayName); in createDocument()
195 final StubDocument document = StubDocument.createRegularDocument(file, mimeType, parent); in createDocument()
317 StubDocument newDoc = StubDocument.createRegularDocument(after, oldDoc.mimeType, in renameDocument()
391 for (final String mimeType : document.streamTypes) { in openTypedDocument()
394 if (mimeType.equals(mimeTypeFilter)) { in openTypedDocument()
552 String mimeType = extras.getString(Document.COLUMN_MIME_TYPE); in dispatchCreateDocumentWithFlags() local
560 documentId = createDocument(rootId, mimeType, name, flags, streamTypes); in dispatchCreateDocumentWithFlags()
585 public String createDocument(String parentId, String mimeType, String displayName, int flags, in createDocument() argument
589 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.java122 int height, String mimeType) throws IOException { in addImage() argument
124 String path = generateFilepath(title, mimeType); in addImage()
128 path, width, height, mimeType); in addImage()
151 String mimeType) { in addImageToMediaStore() argument
155 height, mimeType); in addImageToMediaStore()
174 String path, int width, int height, String mimeType) { in getContentValuesForData() argument
183 values.put(ImageColumns.MIME_TYPE, mimeType); in getContentValuesForData()
271 byte[] jpeg, int width, int height, String mimeType) throws IOException { in updateImage() argument
272 String path = generateFilepath(title, mimeType); in updateImage()
275 width, height, mimeType); in updateImage()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/
DContentTypeField.java71 private String mimeType = ""; field in ContentTypeField
75 …protected ContentTypeField(String name, String body, String raw, String mimeType, Map<String, Stri… in ContentTypeField() argument
77 this.mimeType = mimeType; in ContentTypeField()
96 return mimeType; in getMimeType()
194 public boolean isMimeType(String mimeType) { in isMimeType() argument
195 return this.mimeType.equalsIgnoreCase(mimeType); in isMimeType()
205 return mimeType.startsWith(TYPE_MULTIPART_PREFIX); in isMultipart()
213 String mimeType = ""; in parse() local
238 mimeType = (type + "/" + parser.getSubType()).toLowerCase(); in parse()
256 return new ContentTypeField(name, body, raw, mimeType, parameters, parseException); in parse()
/packages/providers/MediaProvider/src/com/android/providers/media/scan/
DModernMediaScanner.java486 final String mimeType; in scanItem() local
488 mimeType = null; in scanItem()
490 mimeType = MediaFile.getMimeTypeForFile(file.getPath()); in scanItem()
494 return scanItemDirectory(existingId, file, attrs, mimeType, volumeName); in scanItem()
495 } else if (MediaFile.isPlayListMimeType(mimeType)) { in scanItem()
496 return scanItemPlaylist(existingId, file, attrs, mimeType, volumeName); in scanItem()
497 } else if (MediaFile.isAudioMimeType(mimeType)) { in scanItem()
498 return scanItemAudio(existingId, file, attrs, mimeType, volumeName); in scanItem()
499 } else if (MediaFile.isVideoMimeType(mimeType)) { in scanItem()
500 return scanItemVideo(existingId, file, attrs, mimeType, volumeName); in scanItem()
[all …]
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadStorageProvider.java200 public String createDocument(String parentDocId, String mimeType, String displayName) in createDocument() argument
205 String newDocumentId = super.createDocument(parentDocId, mimeType, displayName); in createDocument()
206 if (!Document.MIME_TYPE_DIR.equals(mimeType) in createDocument()
211 newFile.getName(), newFile.getName(), true, mimeType, in createDocument()
400 final String mimeType = cursor.getString( in queryRecentDocuments() local
408 if (mimeType == null || (MediaFile.isImageMimeType(mimeType) in queryRecentDocuments()
409 || MediaFile.isVideoMimeType(mimeType)) && !TextUtils.isEmpty(uri)) { in queryRecentDocuments()
485 final String mimeType = rawFilesCursor.getString( in includeSearchFilesFromSharedStorage() local
490 if (!shouldExcludeMedia || !isMediaMimeType(mimeType)) { in includeSearchFilesFromSharedStorage()
591 private static boolean isMediaMimeType(String mimeType) { in isMediaMimeType() argument
[all …]
DHelpers.java231 String contentDisposition, String contentLocation, String mimeType, int destination) in generateSaveFile() argument
259 if (DownloadDrmHelper.isDrmConvertNeeded(mimeType)) { in generateSaveFile()
281 suffix = chooseExtensionFromMimeType(mimeType, true); in generateSaveFile()
284 suffix = chooseExtensionFromFilename(mimeType, destination, name, dotIndex); in generateSaveFile()
378 private static String chooseExtensionFromMimeType(String mimeType, boolean useDefaults) { in chooseExtensionFromMimeType() argument
380 if (mimeType != null) { in chooseExtensionFromMimeType()
381 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in chooseExtensionFromMimeType()
389 Log.v(Constants.TAG, "couldn't find extension for " + mimeType); in chooseExtensionFromMimeType()
394 if (mimeType != null && mimeType.toLowerCase().startsWith("text/")) { in chooseExtensionFromMimeType()
395 if (mimeType.equalsIgnoreCase("text/html")) { in chooseExtensionFromMimeType()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/
DBodyDescriptor.java35 private String mimeType = "text/plain"; field in BodyDescriptor
58 mimeType = "message/rfc822"; in BodyDescriptor()
60 mimeType = "text/plain"; in BodyDescriptor()
126 mimeType = main; in addField()
321 public boolean isMimeType(String mimeType) { in isMimeType() argument
322 return this.mimeType.equals(mimeType.toLowerCase()); in isMimeType()
329 return mimeType.equals("message/rfc822"); in isMessage()
336 return mimeType.startsWith("multipart/"); in isMultipart()
343 return mimeType; in getMimeType()
390 return mimeType; in toString()
/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/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/UnifiedEmail/src/com/android/mail/utils/
DMimeType.java128 public static String inferMimeType(String name, String mimeType) { in inferMimeType() argument
133 return mimeType; in inferMimeType()
135 final boolean isTextPlain = TEXT_PLAIN.equalsIgnoreCase(mimeType); in inferMimeType()
137 isTextPlain || GENERIC_MIMETYPE.equalsIgnoreCase(mimeType); in inferMimeType()
140 if (isGenericType || TextUtils.isEmpty(mimeType)) { in inferMimeType()
150 return !TextUtils.isEmpty(mimeType) ? mimeType : GENERIC_MIMETYPE; in inferMimeType()
161 public static boolean isEmlMimeType(String mimeType) { in isEmlMimeType() argument
162 return EML_ATTACHMENT_CONTENT_TYPES.contains(mimeType); in isEmlMimeType()
/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/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
/packages/apps/Email/tests/src/com/android/emailcommon/mail/
DMessageTestUtils.java77 public static BodyPart bodyPart(String mimeType, String contentId) throws MessagingException { in bodyPart() argument
78 final MimeBodyPart bp = new MimeBodyPart(null, mimeType); in bodyPart()
93 public static BodyPart textPart(String mimeType, String text) throws MessagingException { in textPart() argument
96 textPart.setHeader(MimeHeader.HEADER_CONTENT_TYPE, mimeType); in textPart()
116 public MultipartBuilder(String mimeType) { in MultipartBuilder() argument
117 this(mimeType, "this_is_boundary"); in MultipartBuilder()
126 public MultipartBuilder(String mimeType, String boundary) { in MultipartBuilder() argument
127 mContentType = mimeType + "; boundary=" + boundary; in MultipartBuilder()
/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/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()
/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/UnifiedEmail/src/com/android/emailcommon/internet/
DMimeUtility.java229 String mimeType = part.getMimeType(); in getTextFromPart() local
230 if (mimeType != null && MimeUtility.mimeTypeMatches(mimeType, "text/*")) { in getTextFromPart()
291 public static boolean mimeTypeMatches(String mimeType, String matchAgainst) { in mimeTypeMatches() argument
294 return p.matcher(mimeType).matches(); in mimeTypeMatches()
306 public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) { in mimeTypeMatches() argument
308 if (mimeTypeMatches(mimeType, matchType)) { in mimeTypeMatches()
379 String mimeType = part.getMimeType().toLowerCase(); in collectParts() local
409 } else if (inline && (mimeType.startsWith("text") || (mimeType.startsWith("image")))) { in collectParts()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DDocumentInfo.java60 public String mimeType; field in DocumentInfo
79 mimeType = null; in reset()
98 mimeType = DurableUtils.readNullableString(in); in read()
117 DurableUtils.writeNullableString(out, mimeType); in write()
166 this.mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE); in updateFromCursor()
220 + ", mimeType=" + mimeType in toString()
277 return Document.MIME_TYPE_DIR.equals(mimeType); in isDirectory()
281 return ArchivesProvider.isSupportedArchiveType(mimeType); in isArchive()
307 return derivedUri.hashCode() + mimeType.hashCode(); in hashCode()
324 && Objects.equals(mimeType, other.mimeType); in equals()

123456789