Searched refs:contentType (Results 1 - 25 of 62) sorted by relevance

123

/packages/apps/Messaging/src/com/android/messaging/util/
H A DContentType.java104 public static boolean isTextType(final String contentType) { argument
105 return TEXT_PLAIN.equals(contentType)
106 || TEXT_HTML.equals(contentType)
107 || APP_WAP_XHTML.equals(contentType);
110 public static boolean isMediaType(final String contentType) { argument
111 return isImageType(contentType)
112 || isVideoType(contentType)
113 || isAudioType(contentType)
114 || isVCardType(contentType);
117 public static boolean isImageType(final String contentType) { argument
121 isAudioType(final String contentType) argument
126 isVideoType(final String contentType) argument
130 isVCardType(final String contentType) argument
134 isDrmType(final String contentType) argument
140 isUnspecified(final String contentType) argument
147 isConversationListPreviewableType(final String contentType) argument
176 getExtension(final String contentType) argument
[all...]
H A DFileUtil.java60 * @param contentType of the media being saved
64 public static File getNewFile(File directory, String contentType) throws IOException { argument
66 String fileExtension = mimeTypeMap.getExtensionFromMimeType(contentType);
69 String fileNameFormat = context.getString(ContentType.isImageType(contentType)
/packages/apps/Messaging/src/com/android/messaging/datamodel/data/
H A DMediaPickerMessagePartData.java25 public MediaPickerMessagePartData(final Rect startRect, final String contentType, argument
27 this(startRect, null /* messageText */, contentType, contentUri, width, height);
31 final String contentType, final Uri contentUri, final int width, final int height) {
32 this(startRect, messageText, contentType, contentUri, width, height,
36 public MediaPickerMessagePartData(final Rect startRect, final String contentType, argument
39 this(startRect, null /* messageText */, contentType, contentUri, width, height,
44 final String contentType, final Uri contentUri, final int width, final int height,
46 super(messageText, contentType, contentUri, width, height, onlySingleAttachment);
30 MediaPickerMessagePartData(final Rect startRect, final String messageText, final String contentType, final Uri contentUri, final int width, final int height) argument
43 MediaPickerMessagePartData(final Rect startRect, final String messageText, final String contentType, final Uri contentUri, final int width, final int height, final boolean onlySingleAttachment) argument
H A DPendingAttachmentData.java57 protected PendingAttachmentData(final String caption, final String contentType, argument
60 super(caption, contentType, sourceUri, width, height, onlySingleAttachment);
68 public static PendingAttachmentData createPendingAttachmentData(final String contentType, argument
70 return createPendingAttachmentData(null, contentType, sourceUri, UNSPECIFIED_SIZE,
75 final String contentType, final Uri sourceUri, final int width, final int height) {
76 Assert.isTrue(ContentType.isMediaType(contentType));
77 return new PendingAttachmentData(caption, contentType, sourceUri, width, height,
82 final String contentType, final Uri sourceUri, final int width, final int height,
84 Assert.isTrue(ContentType.isMediaType(contentType));
85 return new PendingAttachmentData(caption, contentType, sourceUr
74 createPendingAttachmentData(final String caption, final String contentType, final Uri sourceUri, final int width, final int height) argument
81 createPendingAttachmentData(final String caption, final String contentType, final Uri sourceUri, final int width, final int height, final boolean onlySingleAttachment) argument
[all...]
H A DMessagePartData.java120 protected MessagePartData(final String contentType, final Uri contentUri, argument
122 this(null, null, contentType, contentUri, width, height, false /*singlePartOnly*/);
128 protected MessagePartData(final String messageText, final String contentType, argument
130 this(null, messageText, contentType, contentUri, width, height, false /*singlePartOnly*/);
136 protected MessagePartData(final String messageText, final String contentType, argument
138 this(null, messageText, contentType, contentUri, width, height, singlePartOnly);
145 final String contentType, final Uri contentUri, final int width, final int height,
149 mContentType = contentType;
166 public static MessagePartData createMediaMessagePart(final String contentType, argument
168 return new MessagePartData(contentType, contentUr
144 MessagePartData(final String messageId, final String messageText, final String contentType, final Uri contentUri, final int width, final int height, final boolean singlePartOnly) argument
174 createMediaMessagePart(final String caption, final String contentType, final Uri contentUri, final int width, final int height) argument
[all...]
/packages/apps/Messaging/src/android/support/v7/mms/pdu/
H A DContentType.java169 public static boolean isSupportedType(String contentType) { argument
170 return (null != contentType) && sSupportedContentTypes.contains(contentType);
173 public static boolean isSupportedImageType(String contentType) { argument
174 return isImageType(contentType) && isSupportedType(contentType);
177 public static boolean isSupportedAudioType(String contentType) { argument
178 return isAudioType(contentType) && isSupportedType(contentType);
181 public static boolean isSupportedVideoType(String contentType) { argument
185 isTextType(String contentType) argument
189 isImageType(String contentType) argument
193 isAudioType(String contentType) argument
197 isVideoType(String contentType) argument
201 isDrmType(String contentType) argument
207 isUnspecified(String contentType) argument
[all...]
H A DSendReq.java51 * @param contentType the content type value
56 * NullPointerException if contentType, form or transactionId is null.
58 public SendReq(byte[] contentType, argument
64 setContentType(contentType);
H A DPduParser.java172 byte[] contentType = retrieveConf.getContentType();
173 if (null == contentType) {
176 String ctTypeStr = new String(contentType);
783 byte[] contentType =
786 if (null != contentType) {
790 Arrays.toString(contentType));
792 headers.setTextString(contentType, PduHeaders.CONTENT_TYPE);
852 byte[] contentType = parseContentType(pduDataStream, map);
853 if (null != contentType) {
854 part.setContentType(contentType);
[all...]
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/
H A DShareIntentActivity.java78 final String contentType = extractContentType(contentUri, intent.getType());
82 contentUri, intent.getType(), contentType));
84 if (ContentType.TEXT_PLAIN.equals(contentType)) {
91 } else if (ContentType.isImageType(contentType) ||
92 ContentType.isVCardType(contentType) ||
93 ContentType.isAudioType(contentType) ||
94 ContentType.isVideoType(contentType)) {
97 addSharedImagePartToDraft(contentType, contentUri);
103 Assert.fail("Unsupported shared content type for " + contentUri + ": " + contentType
107 final String contentType
131 extractContentType(final Uri uri, final String contentType) argument
161 addSharedImagePartToDraft(final String contentType, final Uri imageUri) argument
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
H A DMimeType.java59 public static boolean isViewable(Context context, Uri contentUri, String contentType) { argument
60 // The provider returns a contentType of "null" instead of null, when the
64 if (contentType == null || contentType.length() == 0 ||
65 NULL_ATTACHMENT_CONTENT_TYPE.equals(contentType)) {
75 Utils.setIntentDataAndTypeAndNormalize(mimetypeIntent, contentUri, contentType);
79 Utils.setIntentDataAndTypeAndNormalize(mimetypeIntent, dummyUri, contentType);
97 contentType, contentUri, mimetypeIntent.getType(), mimetypeIntent.getData());
H A DAttachmentUtils.java98 final String contentType = attachment.getContentType();
99 String displayType = getMimeTypeDisplayName(context, contentType);
100 int index = !TextUtils.isEmpty(contentType) ? contentType.indexOf('/') : -1;
102 displayType = getMimeTypeDisplayName(context, contentType.substring(0, index));
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/
H A DMimeMultipart.java41 public MimeMultipart(String contentType) throws MessagingException { argument
42 this.mContentType = contentType;
44 mSubType = MimeUtility.getHeaderParameter(contentType, null).split("/")[1];
45 mBoundary = MimeUtility.getHeaderParameter(contentType, "boundary");
47 throw new MessagingException("MultiPart does not contain boundary: " + contentType);
52 + contentType
H A DMimeBodyPart.java93 String contentType = String.format("%s;\n charset=utf-8", getMimeType());
96 contentType += String.format(";\n name=\"%s\"", name);
98 setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType);
105 String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE);
106 if (contentType == null) {
109 return contentType;
/packages/apps/UnifiedEmail/src/com/android/emailcommon/internet/
H A DMimeMultipart.java43 public MimeMultipart(String contentType) throws MessagingException { argument
44 this.mContentType = contentType;
46 mSubType = MimeUtility.getHeaderParameter(contentType, null).split("/")[1];
47 mBoundary = MimeUtility.getHeaderParameter(contentType, "boundary");
49 throw new MessagingException("MultiPart does not contain boundary: " + contentType);
54 + contentType + ")", e);
H A DMimeBodyPart.java98 String contentType = String.format("%s;\n charset=utf-8", getMimeType());
101 contentType += String.format(";\n name=\"%s\"", name);
103 setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType);
110 String contentType = getFirstHeader(MimeHeader.HEADER_CONTENT_TYPE);
111 if (contentType == null) {
114 return contentType;
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
H A DDocumentImagePicker.java129 protected void onPostExecute(final String contentType) {
130 if (contentType == null) {
135 PendingAttachmentData.createPendingAttachmentData(contentType,
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
H A DAttachment.java96 private String contentType; field in class:Attachment
166 * Might be null. If null, then the default type (contentType) is assumed
186 contentType = in.readString();
208 contentType = cursor.getString(cursor.getColumnIndex(AttachmentColumns.CONTENT_TYPE));
230 contentType = srcJson.optString(AttachmentColumns.CONTENT_TYPE, null);
259 contentType = MimeType.inferMimeType(name, part.getMimeType());
305 contentType = values.getAsString(AttachmentColumns.CONTENT_TYPE);
331 values.put(AttachmentColumns.CONTENT_TYPE, contentType);
354 dest.writeString(contentType);
374 result.put(AttachmentColumns.CONTENT_TYPE, contentType);
509 setContentType(String contentType) argument
[all...]
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
H A DPduPersister.java416 final byte[] contentType = getByteArrayFromPartColumn(
418 if (contentType != null) {
419 part.setContentType(contentType);
443 final String type = toIsoString(contentType);
779 String contentType = getPartContentType(part);
783 LogUtil.v(TAG, "PduPersister.persistPart part: " + uri + " contentType: " +
784 contentType);
787 if (contentType != null) {
790 if (ContentType.IMAGE_JPG.equals(contentType)) {
791 contentType
858 persistData(final PduPart part, final Uri uri, final String contentType, final Map<Uri, InputStream> preOpenedFiles) argument
[all...]
H A DPduPart.java282 public void setContentType(final byte[] contentType) { argument
283 if (contentType == null) {
287 mPartHeader.put(P_CONTENT_TYPE, contentType);
H A DSendReq.java53 * @param contentType the content type value
58 * NullPointerException if contentType, form or
61 public SendReq(byte[] contentType, argument
67 setContentType(contentType);
/packages/apps/Email/tests/src/com/android/emailcommon/internet/
H A DRfc822OutputTests.java173 Field contentType = header.getField("content-type");
174 assertTrue(contentType.getBody().contains("multipart/alternative"));
217 Field contentType = header.getField("content-type");
218 assertTrue(contentType.getBody().contains("multipart/mixed"));
296 Field contentType = header.getField("MIME-VERSION");
297 assertTrue(contentType.getBody().equals("1.0"));
/packages/apps/Messaging/src/com/android/messaging/ui/
H A DAttachmentPreviewFactory.java68 final String contentType = attachmentData.getContentType();
73 } else if (ContentType.isImageType(contentType)) {
76 } else if (ContentType.isAudioType(contentType)) {
78 } else if (ContentType.isVideoType(contentType)) {
80 } else if (ContentType.isVCardType(contentType)) {
83 Assert.fail("unsupported attachment type: " + contentType);
130 final String contentType = attachmentData.getContentType();
131 if (ContentType.isImageType(contentType)) {
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
H A DBluetoothMapbMessageMime.java150 private String contentType = null; field in class:BluetoothMapbMessageMime
281 public void setContentType(String contentType) { argument
282 this.contentType = contentType;
285 return contentType;
403 if(contentType != null)
405 contentType).append("; boundary=").append(getBoundary()).append("\r\n");
554 contentType = contentTypeParts[0];
708 if(contentType == null)
709 contentType
[all...]
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
H A DBluetoothOppSendFileInfo.java105 String contentType;
111 contentType = contentResolver.getType(uri);
154 contentType = type;
231 return new BluetoothOppSendFileInfo(fileName, contentType, length, is, 0);
/packages/services/Car/service/src/com/android/car/
H A DCarAudioAttributesUtil.java153 private static AudioAttributes createAudioAttributes(int contentType, int usage) { argument
155 return builder.setContentType(contentType).setUsage(usage).build();
159 int contentType, int usage) {
163 return builder.setContentType(contentType).setUsage(usage).addBundle(bundle).build();
158 createCustomAudioAttributes(int carAudioType, int contentType, int usage) argument

Completed in 658 milliseconds

123