Home
last modified time | relevance | path

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

12345678

/frameworks/base/core/java/com/android/internal/util/
DMimeIconUtils.java39 private static MimeTypeInfo buildTypeInfo(String mimeType, int iconId, in buildTypeInfo() argument
45 final String ext = MimeUtils.guessExtensionFromMimeType(mimeType); in buildTypeInfo()
55 private static @Nullable MimeTypeInfo buildTypeInfo(@NonNull String mimeType) { in buildTypeInfo() argument
56 switch (mimeType) { in buildTypeInfo()
59 return buildTypeInfo(mimeType, R.drawable.ic_doc_folder, in buildTypeInfo()
63 return buildTypeInfo(mimeType, R.drawable.ic_doc_apk, in buildTypeInfo()
76 return buildTypeInfo(mimeType, R.drawable.ic_doc_certificate, in buildTypeInfo()
107 return buildTypeInfo(mimeType, R.drawable.ic_doc_codes, in buildTypeInfo()
128 return buildTypeInfo(mimeType, R.drawable.ic_doc_compressed, in buildTypeInfo()
133 return buildTypeInfo(mimeType, R.drawable.ic_doc_contact, in buildTypeInfo()
[all …]
/frameworks/base/media/java/android/media/
DMediaFile.java58 public final String mimeType; field in MediaFile.MediaFileType
60 MediaFileType(int fileType, String mimeType) { in MediaFileType() argument
62 this.mimeType = mimeType; in MediaFileType()
85 static void addFileType(String extension, int fileType, String mimeType) { in addFileType() argument
88 private static void addFileType(int mtpFormatCode, @NonNull String mimeType) { in addFileType() argument
89 if (!sMimeTypeToFormatMap.containsKey(mimeType)) { in addFileType()
90 sMimeTypeToFormatMap.put(mimeType, Integer.valueOf(mtpFormatCode)); in addFileType()
93 sFormatToMimeTypeMap.put(mtpFormatCode, mimeType); in addFileType()
199 public static boolean isExifMimeType(@Nullable String mimeType) { in isExifMimeType() argument
201 return isImageMimeType(mimeType); in isExifMimeType()
[all …]
DDrmInitData.java52 public final String mimeType; field in DrmInitData.SchemeInitData
64 public SchemeInitData(String mimeType, byte[] data) { in SchemeInitData() argument
65 this.mimeType = mimeType; in SchemeInitData()
79 return mimeType.equals(other.mimeType) && Arrays.equals(data, other.data); in equals()
84 return mimeType.hashCode() + 31 * Arrays.hashCode(data); in hashCode()
/frameworks/base/core/java/android/webkit/
DMimeTypeMap.java81 public boolean hasMimeType(String mimeType) { in hasMimeType() argument
82 return MimeUtils.hasMimeType(mimeType); in hasMimeType()
117 public String getExtensionFromMimeType(String mimeType) { in getExtensionFromMimeType() argument
118 return MimeUtils.guessExtensionFromMimeType(mimeType); in getExtensionFromMimeType()
131 /* package */ String remapGenericMimeType(@Nullable String mimeType, String url, in remapGenericMimeType() argument
135 if ("text/plain".equals(mimeType) || in remapGenericMimeType()
136 "application/octet-stream".equals(mimeType)) { in remapGenericMimeType()
150 mimeType = newMimeType; in remapGenericMimeType()
152 } else if ("text/vnd.wap.wml".equals(mimeType)) { in remapGenericMimeType()
154 mimeType = "text/plain"; in remapGenericMimeType()
[all …]
DWebResourceResponse.java62 public WebResourceResponse(String mimeType, String encoding, in WebResourceResponse() argument
64 mMimeType = mimeType; in WebResourceResponse()
89 public WebResourceResponse(String mimeType, String encoding, int statusCode, in WebResourceResponse() argument
91 this(mimeType, encoding, data); in WebResourceResponse()
101 public void setMimeType(String mimeType) { in setMimeType() argument
103 mMimeType = mimeType; in setMimeType()
235 public WebResourceResponse(boolean immutable, String mimeType, String encoding, int statusCode, in WebResourceResponse() argument
238 mMimeType = mimeType; in WebResourceResponse()
DURLUtil.java308 @Nullable String mimeType) { in guessFileName() argument
350 if (mimeType != null) { in guessFileName()
351 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in guessFileName()
357 if (mimeType != null && mimeType.toLowerCase(Locale.ROOT).startsWith("text/")) { in guessFileName()
358 if (mimeType.equalsIgnoreCase("text/html")) { in guessFileName()
368 if (mimeType != null) { in guessFileName()
374 if (typeFromExt != null && !typeFromExt.equalsIgnoreCase(mimeType)) { in guessFileName()
375 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in guessFileName()
/frameworks/base/drm/java/android/drm/
DDrmRights.java53 public DrmRights(String rightsFilePath, String mimeType) { in DrmRights() argument
55 instantiate(file, mimeType); in DrmRights()
65 public DrmRights(String rightsFilePath, String mimeType, String accountId) { in DrmRights() argument
66 this(rightsFilePath, mimeType); in DrmRights()
80 String rightsFilePath, String mimeType, String accountId, String subscriptionId) { in DrmRights() argument
81 this(rightsFilePath, mimeType); in DrmRights()
93 public DrmRights(File rightsFile, String mimeType) { in DrmRights() argument
94 instantiate(rightsFile, mimeType); in DrmRights()
97 private void instantiate(File rightsFile, String mimeType) { in instantiate() argument
104 mMimeType = mimeType; in instantiate()
[all …]
DDrmSupportInfo.java41 public void addMimeType(String mimeType) { in addMimeType() argument
42 if (mimeType == null) { in addMimeType()
45 if (mimeType == "") { in addMimeType()
49 mMimeTypeList.add(mimeType); in addMimeType()
161 /* package */ boolean isSupportedMimeType(String mimeType) { in isSupportedMimeType() argument
162 if (null != mimeType && !mimeType.equals("")) { in isSupportedMimeType()
170 if (completeMimeType.startsWith(mimeType)) { in isSupportedMimeType()
DDrmInfoStatus.java55 public final String mimeType; field in DrmInfoStatus
74 public DrmInfoStatus(int statusCode, int infoType, ProcessedData data, String mimeType) { in DrmInfoStatus() argument
83 if (mimeType == null || mimeType == "") { in DrmInfoStatus()
90 this.mimeType = mimeType; in DrmInfoStatus()
DDrmInfo.java49 public DrmInfo(int infoType, byte[] data, String mimeType) { in DrmInfo() argument
51 mMimeType = mimeType; in DrmInfo()
55 "mimeType: " + mimeType + "," + in DrmInfo()
69 public DrmInfo(int infoType, String path, String mimeType) { in DrmInfo() argument
71 mMimeType = mimeType; in DrmInfo()
82 "mimeType: " + mimeType + "," + in DrmInfo()
DDrmManagerClient.java484 public boolean canHandle(String path, String mimeType) { in canHandle() argument
485 if ((null == path || path.equals("")) && (null == mimeType || mimeType.equals(""))) { in canHandle()
488 return _canHandle(mUniqueId, path, mimeType); in canHandle()
499 public boolean canHandle(Uri uri, String mimeType) { in canHandle() argument
500 if ((null == uri || Uri.EMPTY == uri) && (null == mimeType || mimeType.equals(""))) { in canHandle()
503 return canHandle(convertUriToPath(uri), mimeType); in canHandle()
571 public int getDrmObjectType(String path, String mimeType) { in getDrmObjectType() argument
572 if ((null == path || path.equals("")) && (null == mimeType || mimeType.equals(""))) { in getDrmObjectType()
575 return _getDrmObjectType(mUniqueId, path, mimeType); in getDrmObjectType()
588 public int getDrmObjectType(Uri uri, String mimeType) { in getDrmObjectType() argument
[all …]
/frameworks/base/core/java/android/content/
DMimeTypeFilter.java77 public static boolean matches(@Nullable String mimeType, @NonNull String filter) { in matches() argument
78 if (mimeType == null) { in matches()
82 final String[] mimeTypeParts = mimeType.split("/"); in matches()
94 @Nullable String mimeType, @NonNull String[] filters) { in matches()
95 if (mimeType == null) { in matches()
99 final String[] mimeTypeParts = mimeType.split("/"); in matches()
122 for (String mimeType : mimeTypes) { in matches()
123 final String[] mimeTypeParts = mimeType.split("/"); in matches()
125 return mimeType; in matches()
145 for (String mimeType : mimeTypes) { in matchesMany()
[all …]
/frameworks/base/telephony/java/android/telephony/mbms/
DFileInfo.java34 private final String mimeType; field in FileInfo
54 public FileInfo(Uri uri, String mimeType) { in FileInfo() argument
56 this.mimeType = mimeType; in FileInfo()
61 mimeType = in.readString(); in FileInfo()
67 dest.writeString(mimeType); in writeToParcel()
87 return mimeType; in getMimeType()
101 Objects.equals(mimeType, fileInfo.mimeType); in equals()
106 return Objects.hash(uri, mimeType); in hashCode()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DWap230WspContentTypeTest.java228 String mimeType = unit.getValueString(); in testWellKnownShortIntegerMimeTypeValues() local
230 assertEquals(Wap230WspContentTypeTest.WELL_KNOWN_SHORT_MIME_TYPES.get(value), mimeType); in testWellKnownShortIntegerMimeTypeValues() local
247 String mimeType = unit.getValueString(); in testWellKnownLongIntegerMimeTypeValues() local
249 assertEquals(Wap230WspContentTypeTest.WELL_KNOWN_SHORT_MIME_TYPES.get(value), mimeType); in testWellKnownLongIntegerMimeTypeValues() local
272 String mimeType = unit.getValueString(); in testConstrainedMediaExtensionMedia() local
273 assertEquals(testType, mimeType); in testConstrainedMediaExtensionMedia()
289 String mimeType = unit.getValueString(); in testGeneralFormShortLengthExtensionMedia() local
290 assertEquals(testType, mimeType); in testGeneralFormShortLengthExtensionMedia()
304 String mimeType = unit.getValueString(); in testGeneralFormShortLengthWellKnownShortInteger() local
305 assertEquals(STRING_MIME_TYPE_ROLLOVER_CERTIFICATE, mimeType); in testGeneralFormShortLengthWellKnownShortInteger()
[all …]
/frameworks/av/drm/mediadrm/plugins/clearkey/hidl/
DDrmFactory.cpp46 const hidl_string &mimeType, in isCryptoSchemeSupported_1_2() argument
48 return isCryptoSchemeSupported(uuid) && isContentTypeSupported(mimeType) && in isCryptoSchemeSupported_1_2()
52 Return<bool> DrmFactory::isContentTypeSupported(const hidl_string &mimeType) { in isContentTypeSupported() argument
54 return mimeType == kIsoBmffVideoMimeType || in isContentTypeSupported()
55 mimeType == kIsoBmffAudioMimeType || in isContentTypeSupported()
56 mimeType == kCencInitDataFormat || in isContentTypeSupported()
57 mimeType == kWebmVideoMimeType || in isContentTypeSupported()
58 mimeType == kWebmAudioMimeType || in isContentTypeSupported()
59 mimeType == kWebmInitDataFormat; in isContentTypeSupported()
DInitDataParser.cpp48 const std::string& mimeType, in parse() argument
54 if (mimeType == kIsoBmffVideoMimeType.c_str() || in parse()
55 mimeType == kIsoBmffAudioMimeType.c_str() || in parse()
56 mimeType == kCencInitDataFormat.c_str()) { in parse()
61 } else if (mimeType == kWebmVideoMimeType.c_str() || in parse()
62 mimeType == kWebmAudioMimeType.c_str() || in parse()
63 mimeType == kWebmInitDataFormat.c_str()) { in parse()
/frameworks/base/packages/WallpaperCropper/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()
/frameworks/base/core/java/android/app/
DRemoteInput.java286 public Builder setAllowDataType(@NonNull String mimeType, boolean doAllow) { in setAllowDataType() argument
288 mAllowedDataTypes.add(mimeType); in setAllowDataType()
290 mAllowedDataTypes.remove(mimeType); in setAllowDataType()
404 String mimeType = key.substring(EXTRA_DATA_TYPE_RESULTS_DATA.length()); in getDataResultsFromIntent() local
405 if (mimeType == null || mimeType.isEmpty()) { in getDataResultsFromIntent()
413 results.put(mimeType, Uri.parse(uriStr)); in getDataResultsFromIntent()
485 String mimeType = entry.getKey(); in addDataResultToIntent() local
487 if (mimeType == null) { in addDataResultToIntent()
491 clipDataIntent.getBundleExtra(getExtraResultsKeyForData(mimeType)); in addDataResultToIntent()
497 clipDataIntent.putExtra(getExtraResultsKeyForData(mimeType), resultsBundle); in addDataResultToIntent()
[all …]
/frameworks/av/drm/libdrmframework/
DDrmManagerClientImpl.cpp119 int uniqueId, const String8& path, const String8& mimeType) { in canHandle() argument
121 if ((EMPTY_STRING != path) || (EMPTY_STRING != mimeType)) { in canHandle()
122 retCode = getDrmManagerService()->canHandle(uniqueId, path, mimeType); in canHandle()
153 String8 mimeType = EMPTY_STRING; in getOriginalMimeType() local
155 mimeType = getDrmManagerService()->getOriginalMimeType(uniqueId, path, fd); in getOriginalMimeType()
157 return mimeType; in getOriginalMimeType()
161 int uniqueId, const String8& path, const String8& mimeType) { in getDrmObjectType() argument
163 if ((EMPTY_STRING != path) || (EMPTY_STRING != mimeType)) { in getDrmObjectType()
165 getDrmManagerService()->getDrmObjectType(uniqueId, path, mimeType); in getDrmObjectType()
226 int uniqueId, const String8& mimeType) { in openConvertSession() argument
[all …]
DDrmManagerClient.cpp50 bool DrmManagerClient::canHandle(const String8& path, const String8& mimeType) { in canHandle() argument
51 return mDrmManagerClientImpl->canHandle(mUniqueId, path, mimeType); in canHandle()
71 int DrmManagerClient::getDrmObjectType(const String8& path, const String8& mimeType) { in getDrmObjectType() argument
72 return mDrmManagerClientImpl->getDrmObjectType( mUniqueId, path, mimeType); in getDrmObjectType()
103 int DrmManagerClient::openConvertSession(const String8& mimeType) { in openConvertSession() argument
104 return mDrmManagerClientImpl->openConvertSession(mUniqueId, mimeType); in openConvertSession()
134 const DrmBuffer& buf, const String8& mimeType) { in openDecryptSession() argument
135 return mDrmManagerClientImpl->openDecryptSession(mUniqueId, buf, mimeType); in openDecryptSession()
/frameworks/av/drm/common/
DDrmRights.cpp22 DrmRights::DrmRights(const String8& rightsFilePath, const String8& mimeType, in DrmRights() argument
24 mMimeType(mimeType), in DrmRights()
35 DrmRights::DrmRights(const DrmBuffer& rightsData, const String8& mimeType, in DrmRights() argument
38 mMimeType(mimeType), in DrmRights()
/frameworks/opt/vcard/tests/src/com/android/vcard/tests/testutils/
DImportTestProvider.java45 final String mimeType = expectedContentValues.getAsString(Data.MIMETYPE); in addExpectedContentValues() local
48 if (mMimeTypeToExpectedContentValues.containsKey(mimeType)) { in addExpectedContentValues()
49 contentValuesCollection = mMimeTypeToExpectedContentValues.get(mimeType); in addExpectedContentValues()
52 mMimeTypeToExpectedContentValues.put(mimeType, contentValuesCollection); in addExpectedContentValues()
86 final String mimeType = actualContentValues.getAsString(Data.MIMETYPE); in applyBatch() local
87 if (!mMimeTypeToExpectedContentValues.containsKey(mimeType)) { in applyBatch()
88 TestCase.fail("Unregistered MimeType " + mimeType); in applyBatch()
116 mMimeTypeToExpectedContentValues.get(mimeType); in applyBatch()
118 TestCase.fail("ContentValues for MimeType " + mimeType in applyBatch()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DMediaFileTest.java121 private static void assertConsistent(String path, String mimeType, int formatCode) { in assertConsistent() argument
123 assertHexEquals(formatCode, getFormatCode(null, mimeType)); in assertConsistent()
124 assertHexEquals(formatCode, getFormatCode(path, mimeType)); in assertConsistent()
126 assertEquals(mimeType, getMimeType(path, MtpConstants.FORMAT_UNDEFINED)); in assertConsistent()
127 assertEquals(mimeType, getMimeType(null, formatCode)); in assertConsistent()
128 assertEquals(mimeType, getMimeType(path, formatCode)); in assertConsistent()
/frameworks/av/drm/mediadrm/plugins/clearkey/default/tests/
DInitDataParserUnittest.cpp41 const String8& mimeType, in attemptParse() argument
44 return parser.parse(initData, mimeType, licenseRequest); in attemptParse()
48 const String8& mimeType, in attemptParseExpectingSuccess() argument
53 ASSERT_EQ(android::OK, attemptParse(initData, mimeType, &request)); in attemptParseExpectingSuccess()
71 const String8& mimeType) { in attemptParseExpectingFailure() argument
73 ASSERT_NE(android::OK, attemptParse(initData, mimeType, &request)); in attemptParseExpectingFailure()
/frameworks/av/drm/drmserver/
DDrmManager.h77 bool canHandle(int uniqueId, const String8& path, const String8& mimeType);
88 int getDrmObjectType(int uniqueId, const String8& path, const String8& mimeType);
105 int openConvertSession(int uniqueId, const String8& mimeType);
119 const String8& mimeType);
138 String8 getSupportedPlugInId(int uniqueId, const String8& path, const String8& mimeType);
140 String8 getSupportedPlugInId(const String8& mimeType);

12345678