/aosp12/packages/apps/Messaging/src/com/android/messaging/util/ |
H A D | ContentType.java | 111 return isImageType(contentType) in isMediaType() 118 return (null != contentType) && contentType.startsWith(IMAGE_PREFIX); in isImageType() 123 (contentType.startsWith("audio/") || contentType.equalsIgnoreCase(AUDIO_OGG)); in isAudioType() 127 return (null != contentType) && contentType.startsWith("video/"); in isVideoType() 131 return (null != contentType) && contentType.equalsIgnoreCase(TEXT_VCARD); in isVCardType() 135 return (null != contentType) in isDrmType() 141 return (null != contentType) && contentType.endsWith("*"); in isUnspecified() 148 return ContentType.isAudioType(contentType) || ContentType.isVideoType(contentType) || in isConversationListPreviewableType() 149 ContentType.isImageType(contentType) || ContentType.isVCardType(contentType); in isConversationListPreviewableType() 165 if (contentType == null) { in getContentTypeFromExtension() [all …]
|
/aosp12/packages/apps/Messaging/src/android/support/v7/mms/pdu/ |
H A D | ContentType.java | 170 return (null != contentType) && sSupportedContentTypes.contains(contentType); in isSupportedType() 174 return isImageType(contentType) && isSupportedType(contentType); in isSupportedImageType() 178 return isAudioType(contentType) && isSupportedType(contentType); in isSupportedAudioType() 182 return isVideoType(contentType) && isSupportedType(contentType); in isSupportedVideoType() 186 return (null != contentType) && contentType.startsWith("text/"); in isTextType() 190 return (null != contentType) && contentType.startsWith("image/"); in isImageType() 194 return (null != contentType) && contentType.startsWith("audio/"); in isAudioType() 198 return (null != contentType) && contentType.startsWith("video/"); in isVideoType() 202 return (null != contentType) in isDrmType() 203 && (contentType.equals(APP_DRM_CONTENT) in isDrmType() [all …]
|
H A D | PduParser.java | 173 if (null == contentType) { in parse() 176 String ctTypeStr = new String(contentType); in parse() 783 byte[] contentType = in parseHeaders() 786 if (null != contentType) { in parseHeaders() 853 if (null != contentType) { in parseParts() 854 part.setContentType(contentType); in parseParts() 1530 byte[] contentType = null; in parseContentType() 1576 contentType = in parseContentType() 1580 return contentType; in parseContentType() 1781 byte[] contentType = part.getContentType(); in checkPartPosition() [all …]
|
/aosp12/frameworks/base/telephony/common/com/google/android/mms/ |
H A D | ContentType.java | 177 return (null != contentType) && sSupportedContentTypes.contains(contentType); in isSupportedType() 182 return isImageType(contentType) && isSupportedType(contentType); in isSupportedImageType() 187 return isAudioType(contentType) && isSupportedType(contentType); in isSupportedAudioType() 192 return isVideoType(contentType) && isSupportedType(contentType); in isSupportedVideoType() 197 return (null != contentType) && contentType.startsWith("text/"); in isTextType() 202 return (null != contentType) && contentType.startsWith("image/"); in isImageType() 207 return (null != contentType) && contentType.startsWith("audio/"); in isAudioType() 212 return (null != contentType) && contentType.startsWith("video/"); in isVideoType() 217 return (null != contentType) in isDrmType() 218 && (contentType.equals(APP_DRM_CONTENT) in isDrmType() [all …]
|
/aosp12/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/ |
H A D | MimeMultipart.java | 30 protected String contentType; field in MimeMultipart 41 public MimeMultipart(String contentType) throws MessagingException { in MimeMultipart() argument 42 this.contentType = contentType; in MimeMultipart() 44 subType = MimeUtility.getHeaderParameter(contentType, null).split("/")[1]; in MimeMultipart() 45 boundary = MimeUtility.getHeaderParameter(contentType, "boundary"); in MimeMultipart() 47 throw new MessagingException("MultiPart does not contain boundary: " + contentType); in MimeMultipart() 52 + contentType in MimeMultipart() 77 return contentType; in getContentType() 82 contentType = String.format("multipart/%s; boundary=\"%s\"", subType, boundary); in setSubType()
|
H A D | MimeBodyPart.java | 93 String contentType = String.format("%s;\n charset=utf-8", getMimeType()); in setBody() local 96 contentType += String.format(";\n name=\"%s\"", name); in setBody() 98 setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType); in setBody() 105 String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE); in getContentType() local 106 if (contentType == null) { in getContentType() 109 return contentType; in getContentType()
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/datamodel/data/ |
H A D | MediaPickerMessagePartData.java | 25 public MediaPickerMessagePartData(final Rect startRect, final String contentType, in MediaPickerMessagePartData() argument 27 this(startRect, null /* messageText */, contentType, contentUri, width, height); in MediaPickerMessagePartData() 31 final String contentType, final Uri contentUri, final int width, final int height) { in MediaPickerMessagePartData() argument 32 this(startRect, messageText, contentType, contentUri, width, height, in MediaPickerMessagePartData() 36 public MediaPickerMessagePartData(final Rect startRect, final String contentType, in MediaPickerMessagePartData() argument 39 this(startRect, null /* messageText */, contentType, contentUri, width, height, in MediaPickerMessagePartData() 44 final String contentType, final Uri contentUri, final int width, final int height, in MediaPickerMessagePartData() argument 46 super(messageText, contentType, contentUri, width, height, onlySingleAttachment); in MediaPickerMessagePartData()
|
H A D | PendingAttachmentData.java | 57 protected PendingAttachmentData(final String caption, final String contentType, in PendingAttachmentData() argument 60 super(caption, contentType, sourceUri, width, height, onlySingleAttachment); in PendingAttachmentData() 68 public static PendingAttachmentData createPendingAttachmentData(final String contentType, in createPendingAttachmentData() argument 70 return createPendingAttachmentData(null, contentType, sourceUri, UNSPECIFIED_SIZE, in createPendingAttachmentData() 75 final String contentType, final Uri sourceUri, final int width, final int height) { in createPendingAttachmentData() argument 76 Assert.isTrue(ContentType.isMediaType(contentType)); in createPendingAttachmentData() 77 return new PendingAttachmentData(caption, contentType, sourceUri, width, height, in createPendingAttachmentData() 82 final String contentType, final Uri sourceUri, final int width, final int height, in createPendingAttachmentData() argument 84 Assert.isTrue(ContentType.isMediaType(contentType)); in createPendingAttachmentData() 85 return new PendingAttachmentData(caption, contentType, sourceUri, width, height, in createPendingAttachmentData()
|
H A D | MessagePartData.java | 133 protected MessagePartData(final String contentType, final Uri contentUri, in MessagePartData() argument 141 protected MessagePartData(final String messageText, final String contentType, in MessagePartData() argument 149 protected MessagePartData(final String messageText, final String contentType, in MessagePartData() argument 151 this(null, messageText, contentType, contentUri, width, height, singlePartOnly); in MessagePartData() 162 mContentType = contentType; in MessagePartData() 179 public static MessagePartData createMediaMessagePart(final String contentType, in createMediaMessagePart() argument 181 return new MessagePartData(contentType, contentUri, width, height); in createMediaMessagePart() 189 return new MessagePartData(null, caption, contentType, contentUri, width, height, in createMediaMessagePart() 344 public static boolean isSupportedMediaType(final String contentType) { in isSupportedMediaType() argument 345 return ContentType.isVCardType(contentType) in isSupportedMediaType() [all …]
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/ |
H A D | ShareIntentActivity.java | 98 final String contentType = extractContentType(contentUri, intent.getType()); in onAttachFragment() local 102 contentUri, intent.getType(), contentType)); in onAttachFragment() 104 if (ContentType.TEXT_PLAIN.equals(contentType)) { in onAttachFragment() 115 } else if (PendingAttachmentData.isSupportedMediaType(contentType)) { in onAttachFragment() 118 addSharedPartToDraft(contentType, contentUri); in onAttachFragment() 125 + ": " + contentType + " (" + intent.getType() + ")"); in onAttachFragment() 129 final String contentType = intent.getType(); in onAttachFragment() local 212 private static String extractContentType(final Uri uri, final String contentType) { in extractContentType() argument 214 return contentType; in extractContentType() 239 return contentType; in extractContentType() [all …]
|
/aosp12/frameworks/av/media/libaaudio/tests/ |
H A D | test_attributes.cpp | 33 aaudio_content_type_t contentType, in checkAttributes() argument 55 if (contentType != DONT_SET) { in checkAttributes() 56 AAudioStreamBuilder_setContentType(aaudioBuilder, contentType); in checkAttributes() 80 (contentType == DONT_SET || contentType == AAUDIO_UNSPECIFIED) in checkAttributes() 82 : contentType; in checkAttributes() 182 for (aaudio_content_type_t contentType : sContentypes) { in checkAttributesContentType() local 183 checkAttributes(perfMode, DONT_SET, contentType); in checkAttributesContentType()
|
/aosp12/packages/modules/Wifi/framework/java/android/net/wifi/hotspot2/ |
H A D | ConfigParser.java | 89 public String contentType = null; field in ConfigParser.MimeHeader 228 if (!TextUtils.equals(header.contentType, TYPE_MULTIPART_MIXED)) { in parseMimeMultipartMessage() 229 throw new IOException("Invalid content type: " + header.contentType); in parseMimeMultipartMessage() 279 if (!TextUtils.equals(header.contentType, TYPE_PASSPOINT_PROFILE) && in parseMimePart() 280 !TextUtils.equals(header.contentType, TYPE_CA_CERT) && in parseMimePart() 281 !TextUtils.equals(header.contentType, TYPE_PKCS12)) { in parseMimePart() 282 throw new IOException("Unexpected content type: " + header.contentType); in parseMimePart() 305 part.type = header.contentType; in parseMimePart() 329 header.contentType = value.first; in parseHeaders() 355 String[] attributes = contentType.split(";"); in parseContentType() [all …]
|
/aosp12/frameworks/av/media/libdatasource/ |
H A D | DataSourceFactory.cpp | 50 String8 *contentType, in CreateFromURI() argument 52 if (contentType != NULL) { in CreateFromURI() 53 *contentType = ""; in CreateFromURI() 89 if (contentType != NULL) { in CreateFromURI() 90 *contentType = mediaHTTP->getMIMEType(); in CreateFromURI()
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/ |
H A D | PduPersister.java | 418 if (contentType != null) { in loadParts() 419 part.setContentType(contentType); in loadParts() 779 String contentType = getPartContentType(part); in persistPart() local 784 contentType); in persistPart() 787 if (contentType != null) { in persistPart() 791 contentType = ContentType.IMAGE_JPEG; in persistPart() 812 values.put(Part.CONTENT_TYPE, contentType); in persistPart() 1092 if (contentType != null) { in updateHeaders() 1189 String contentType = null; in updatePart() local 1473 contentType); in persist() [all …]
|
H A D | PduParser.java | 198 if (null == contentType) { in parse() 201 String ctTypeStr = new String(contentType); in parse() 815 byte[] contentType = in parseHeaders() 818 if (null != contentType) { in parseHeaders() 887 if (null != contentType) { in parseParts() 888 part.setContentType(contentType); in parseParts() 1567 byte[] contentType = null; in parseContentType() 1613 contentType = in parseContentType() 1617 return contentType; in parseContentType() 1817 byte[] contentType = part.getContentType(); in checkPartPosition() [all …]
|
/aosp12/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/converter/ |
H A D | FwdLockConv.c | 142 FwdLockConv_String_t contentType; member 475 if (pSession->contentType.ptr == NULL) { in FwdLockConv_RecognizeMimeHeaderName() 504 if (pSession->contentType.ptr == NULL) { in FwdLockConv_ApplyDefaults() 507 if (pSession->contentType.ptr == NULL) { in FwdLockConv_ApplyDefaults() 511 pSession->contentType.length = strlenTextPlain; in FwdLockConv_ApplyDefaults() 512 pSession->contentType.maxLength = strlenTextPlain; in FwdLockConv_ApplyDefaults() 530 if (pSession->contentType.ptr == NULL) { in FwdLockConv_VerifyContentType() 552 if (pSession->contentType.length > UCHAR_MAX) { in FwdLockConv_WriteHeader() 569 pSession->contentType.ptr, pSession->contentType.length); in FwdLockConv_WriteHeader() 1224 pSession->contentType.length); in FwdLockConv_CloseSession() [all …]
|
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/ |
H A D | BipAttachmentFormat.java | 70 public BipAttachmentFormat(String contentType, String charset, String name, String size, in BipAttachmentFormat() argument 72 if (contentType == null) { in BipAttachmentFormat() 79 mContentType = contentType; in BipAttachmentFormat() 101 public BipAttachmentFormat(String contentType, String charset, String name, int size, in BipAttachmentFormat() argument 103 mContentType = Objects.requireNonNull(contentType, "Content-Type cannot be null"); in BipAttachmentFormat()
|
/aosp12/packages/apps/Dialer/java/com/android/voicemail/impl/sms/ |
H A D | SyncMessage.java | 42 private final String contentType; field in SyncMessage 59 + contentType in toString() 71 contentType = getString(wrappedData, OmtpConstants.CONTENT_TYPE); in SyncMessage() 115 return contentType; in getContentType()
|
/aosp12/frameworks/base/telephony/common/com/google/android/mms/pdu/ |
H A D | PduPersister.java | 416 if (contentType != null) { in loadParts() 417 part.setContentType(contentType); in loadParts() 441 String type = toIsoString(contentType); in loadParts() 728 String contentType = getPartContentType(part); in persistPart() local 729 if (contentType != null) { in persistPart() 733 contentType = ContentType.IMAGE_JPEG; in persistPart() 736 values.put(Part.CONTENT_TYPE, contentType); in persistPart() 966 byte[] contentType = sendReq.getContentType(); in updateHeaders() 967 if (contentType != null) { in updateHeaders() 1062 String contentType = null; in updatePart() local [all …]
|
H A D | PduParser.java | 179 if (null == contentType) { in parse() 182 String ctTypeStr = new String(contentType); in parse() 789 byte[] contentType = in parseHeaders() 792 if (null != contentType) { in parseHeaders() 859 if (null != contentType) { in parseParts() 860 part.setContentType(contentType); in parseParts() 1542 byte[] contentType = null; in parseContentType() 1593 contentType = in parseContentType() 1597 return contentType; in parseContentType() 1800 byte[] contentType = part.getContentType(); in checkPartPosition() [all …]
|
/aosp12/frameworks/av/media/libaaudio/src/binding/ |
H A D | AAudioStreamConfiguration.cpp | 44 static_assert(sizeof(aaudio_content_type_t) == sizeof(parcelable.contentType)); in AAudioStreamConfiguration() 45 setContentType(parcelable.contentType); in AAudioStreamConfiguration() 84 static_assert(sizeof(aaudio_content_type_t) == sizeof(result.contentType)); in parcelable() 85 result.contentType = getContentType(); in parcelable()
|
/aosp12/packages/apps/Messaging/src/com/android/messaging/ui/ |
H A D | AttachmentPreviewFactory.java | 68 final String contentType = attachmentData.getContentType(); in createAttachmentPreview() local 73 } else if (ContentType.isImageType(contentType)) { in createAttachmentPreview() 76 } else if (ContentType.isAudioType(contentType)) { in createAttachmentPreview() 78 } else if (ContentType.isVideoType(contentType)) { in createAttachmentPreview() 80 } else if (ContentType.isVCardType(contentType)) { in createAttachmentPreview() 83 Assert.fail("unsupported attachment type: " + contentType); in createAttachmentPreview() 130 final String contentType = attachmentData.getContentType(); in getImageRequestDescriptorForAttachment() local 131 if (ContentType.isImageType(contentType)) { in getImageRequestDescriptorForAttachment()
|
/aosp12/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/http/ |
H A D | HttpResponse.java | 34 public abstract int contentType(); in contentType() method in HttpResponse 54 public abstract Builder setContentType(int contentType); in setContentType() argument 81 .append(contentType()) in toString()
|
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/http/multipart/ |
H A D | MultipartTest.java | 55 StringBuffer contentType = new StringBuffer("multipart/form-data"); in testParts() local 56 contentType.append("; boundary="); in testParts() 57 contentType.append(boundry); in testParts() 58 assertEquals("Multipart content type error", contentType.toString(), h.getValue()); in testParts()
|
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/ |
H A D | BipAttachmentFormatTest.java | 49 private void testParse(String contentType, String charset, String name, String size, in testParse() argument 53 BipAttachmentFormat attachment = new BipAttachmentFormat(contentType, charset, name, in testParse() 55 Assert.assertEquals(contentType, attachment.getContentType()); in testParse() 75 private void testCreate(String contentType, String charset, String name, int size, in testCreate() argument 77 BipAttachmentFormat attachment = new BipAttachmentFormat(contentType, charset, name, in testCreate() 79 Assert.assertEquals(contentType, attachment.getContentType()); in testCreate()
|