/packages/apps/Email/tests/src/com/android/exchange/ |
D | EasEmailSyncAdapterTests.java | 70 String mimeType = p.getMimeTypeFromFileName("foo.jpg"); in testGetMimeTypeFromFileName() local 71 assertEquals("image/jpeg", mimeType); in testGetMimeTypeFromFileName() 73 mimeType = p.getMimeTypeFromFileName("foo.JPG"); in testGetMimeTypeFromFileName() 74 assertEquals("image/jpeg", mimeType); in testGetMimeTypeFromFileName() 75 mimeType = p.getMimeTypeFromFileName("this_is_a_weird_filename.gif"); in testGetMimeTypeFromFileName() 76 assertEquals("image/gif", mimeType); in testGetMimeTypeFromFileName() 78 mimeType = p.getMimeTypeFromFileName("foo."); in testGetMimeTypeFromFileName() 79 assertEquals("application/octet-stream", mimeType); in testGetMimeTypeFromFileName() 81 mimeType = p.getMimeTypeFromFileName("....."); in testGetMimeTypeFromFileName() 82 assertEquals("application/octet-stream", mimeType); in testGetMimeTypeFromFileName() [all …]
|
/packages/apps/Browser/src/com/android/browser/ |
D | FetchUrlMimeType.java | 83 String mimeType = null; in doInBackground() local 92 mimeType = header.getValue(); in doInBackground() 93 final int semicolonIndex = mimeType.indexOf(';'); in doInBackground() 95 mimeType = mimeType.substring(0, semicolonIndex); in doInBackground() 107 return mimeType; in doInBackground() 111 public void onPostExecute(String mimeType) { in onPostExecute() argument 112 if (mimeType != null) { in onPostExecute() 114 if (mimeType.equalsIgnoreCase("text/plain") || in onPostExecute() 115 mimeType.equalsIgnoreCase("application/octet-stream")) { in onPostExecute() 124 null, mimeType); in onPostExecute()
|
/packages/apps/Email/src/org/apache/james/mime4j/field/ |
D | ContentTypeField.java | 69 private String mimeType = ""; field in ContentTypeField 73 …protected ContentTypeField(String name, String body, String raw, String mimeType, Map parameters, … in ContentTypeField() argument 75 this.mimeType = mimeType; in ContentTypeField() 94 return mimeType; in getMimeType() 191 public boolean isMimeType(String mimeType) { in isMimeType() argument 192 return this.mimeType.equalsIgnoreCase(mimeType); in isMimeType() 202 return mimeType.startsWith(TYPE_MULTIPART_PREFIX); in isMultipart() 210 String mimeType = ""; in parse() local 235 mimeType = (type + "/" + parser.getSubType()).toLowerCase(); in parse() 253 return new ContentTypeField(name, body, raw, mimeType, parameters, parseException); in parse()
|
/packages/apps/Email/tests/src/com/android/email/mail/ |
D | MessageTestUtils.java | 80 public static BodyPart bodyPart(String mimeType, String contentId) throws MessagingException { in bodyPart() argument 81 final MimeBodyPart bp = new MimeBodyPart(null, mimeType); in bodyPart() 96 public static BodyPart textPart(String mimeType, String text) throws MessagingException { in textPart() argument 99 textPart.setHeader(MimeHeader.HEADER_CONTENT_TYPE, mimeType); in textPart() 114 public static BodyPart imagePart(String mimeType, String contentId, in imagePart() argument 119 imagePart.setHeader(MimeHeader.HEADER_CONTENT_TYPE, mimeType); in imagePart() 142 public MultipartBuilder(String mimeType) { in MultipartBuilder() argument 143 this(mimeType, "this_is_boundary"); in MultipartBuilder() 152 public MultipartBuilder(String mimeType, String boundary) { in MultipartBuilder() argument 153 mContentType = mimeType + "; boundary=" + boundary; in MultipartBuilder()
|
/packages/apps/Email/src/org/apache/james/mime4j/ |
D | BodyDescriptor.java | 38 private String mimeType = "text/plain"; field in BodyDescriptor 61 mimeType = "message/rfc822"; in BodyDescriptor() 63 mimeType = "text/plain"; in BodyDescriptor() 129 mimeType = main; in addField() 322 public boolean isMimeType(String mimeType) { in isMimeType() argument 323 return this.mimeType.equals(mimeType.toLowerCase()); in isMimeType() 332 return mimeType.equals("message/rfc822"); in isMessage() 341 return mimeType.startsWith("multipart/"); in isMultipart() 350 return mimeType; in getMimeType() 408 return mimeType; in toString()
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | Helpers.java | 87 String mimeType, in generateSaveFile() argument 96 if (mimeType == null) { in generateSaveFile() 102 if (!DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(mimeType)) { in generateSaveFile() 116 intent.setDataAndType(Uri.fromParts("file", "", null), mimeType); in generateSaveFile() 122 Log.d(Constants.TAG, "no handler found for type " + mimeType); in generateSaveFile() 136 extension = chooseExtensionFromMimeType(mimeType, true); in generateSaveFile() 139 mimeType, destination, filename, dotIndex); in generateSaveFile() 154 || DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(mimeType)) { in generateSaveFile() 309 private static String chooseExtensionFromMimeType(String mimeType, boolean useDefaults) { in chooseExtensionFromMimeType() argument 311 if (mimeType != null) { in chooseExtensionFromMimeType() [all …]
|
D | DownloadThread.java | 90 String mimeType = sanitizeMimeType(mInfo.mMimeType); in run() local 162 .equalsIgnoreCase(mimeType)) { in run() 362 if (mimeType == null) { in run() 365 mimeType = sanitizeMimeType(header.getValue()); in run() 394 Log.v(Constants.TAG, "Content-Type: " + mimeType); in run() 417 mimeType, in run() 437 if (mimeType != null) { in run() 438 values.put(Downloads.COLUMN_MIME_TYPE, mimeType); in run() 572 .equalsIgnoreCase(mimeType)) { in run() 679 .equalsIgnoreCase(mimeType)) { in run() [all …]
|
/packages/apps/Email/src/com/android/email/mail/internet/ |
D | MimeUtility.java | 209 public static Part findFirstPartByMimeType(Part part, String mimeType) in findFirstPartByMimeType() argument 215 Part ret = findFirstPartByMimeType(bodyPart, mimeType); in findFirstPartByMimeType() 221 else if (part.getMimeType().equalsIgnoreCase(mimeType)) { in findFirstPartByMimeType() 256 String mimeType = part.getMimeType(); in getTextFromPart() local 257 if (mimeType != null && MimeUtility.mimeTypeMatches(mimeType, "text/*")) { in getTextFromPart() 318 public static boolean mimeTypeMatches(String mimeType, String matchAgainst) { in mimeTypeMatches() argument 321 return p.matcher(mimeType).matches(); in mimeTypeMatches() 333 public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) { in mimeTypeMatches() argument 335 if (mimeTypeMatches(mimeType, matchType)) { in mimeTypeMatches()
|
D | MimeBodyPart.java | 52 public MimeBodyPart(Body body, String mimeType) throws MessagingException { in MimeBodyPart() argument 53 if (mimeType != null) { in MimeBodyPart() 54 setHeader(MimeHeader.HEADER_CONTENT_TYPE, mimeType); in MimeBodyPart() 133 public boolean isMimeType(String mimeType) throws MessagingException { in isMimeType() argument 134 return getMimeType().equals(mimeType); in isMimeType()
|
/packages/apps/Contacts/src/com/android/contacts/model/ |
D | EntityDelta.java | 152 public ValuesDelta getPrimaryEntry(String mimeType) { in getPrimaryEntry() argument 153 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getPrimaryEntry() 170 public ValuesDelta getSuperPrimaryEntry(String mimeType) { in getSuperPrimaryEntry() argument 171 return getSuperPrimaryEntry(mimeType, true); in getSuperPrimaryEntry() 180 public ValuesDelta getSuperPrimaryEntry(String mimeType, boolean forceSelection) { in getSuperPrimaryEntry() argument 181 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getSuperPrimaryEntry() 208 private ArrayList<ValuesDelta> getMimeEntries(String mimeType, boolean lazyCreate) { in getMimeEntries() argument 209 ArrayList<ValuesDelta> mimeEntries = mEntries.get(mimeType); in getMimeEntries() 212 mEntries.put(mimeType, mimeEntries); in getMimeEntries() 217 public ArrayList<ValuesDelta> getMimeEntries(String mimeType) { in getMimeEntries() argument [all …]
|
D | ContactsSource.java | 169 public DataKind getKindForMimetype(String mimeType) { in getKindForMimetype() argument 170 return this.mMimeKinds.get(mimeType); in getKindForMimetype() 179 this.mMimeKinds.put(kind.mimeType, kind); in addKind() 191 public String mimeType; field in ContactsSource.DataKind 216 public DataKind(String mimeType, int titleRes, int iconRes, int weight, boolean editable) { in DataKind() argument 217 this.mimeType = mimeType; in DataKind()
|
D | EntityModifier.java | 64 final int visibleCount = state.getMimeEntriesCount(kind.mimeType, true); in canInsert() 83 public static void ensureKindExists(EntityDelta state, ContactsSource source, String mimeType) { in ensureKindExists() argument 84 final DataKind kind = source.getKindForMimetype(mimeType); in ensureKindExists() 85 final boolean hasChild = state.getMimeEntriesCount(mimeType, true) > 0; in ensureKindExists() 90 if (kind.mimeType.equals(Photo.CONTENT_ITEM_TYPE)) { in ensureKindExists() 175 final List<ValuesDelta> mimeEntries = state.getMimeEntries(kind.mimeType); in getTypeFrequencies() 331 after.put(Data.MIMETYPE, kind.mimeType); in insertChild() 374 final String mimeType = kind.mimeType; in trimEmpty() local 375 final ArrayList<ValuesDelta> entries = state.getMimeEntries(mimeType); in trimEmpty() 389 final boolean isPhoto = TextUtils.equals(Photo.CONTENT_ITEM_TYPE, kind.mimeType); in trimEmpty()
|
/packages/apps/Camera/src/com/android/camera/gallery/ |
D | Image.java | 46 String mimeType, long dateTaken, String title, String displayName, in Image() argument 49 mimeType, dateTaken, title, displayName); in Image() 70 String mimeType = getMimeType(); in isReadonly() local 71 return !"image/jpeg".equals(mimeType) && !"image/png".equals(mimeType); in isReadonly()
|
D | DrmImageList.java | 62 long miniThumbMagic, String mimeType, long dateTaken, in DrmImage() argument 65 mimeType, dateTaken, title, displayName, rotation); in DrmImage() 105 String mimeType = cursor.getString(INDEX_MIME_TYPE); in loadImageFromCursor() local 107 contentUri(id), dataPath, 0, mimeType, 0, "DrmImage-" + id, in loadImageFromCursor()
|
/packages/apps/Gallery/src/com/android/camera/gallery/ |
D | Image.java | 46 String mimeType, long dateTaken, String title, String displayName, in Image() argument 49 mimeType, dateTaken, title, displayName); in Image() 70 String mimeType = getMimeType(); in isReadonly() local 71 return !"image/jpeg".equals(mimeType) && !"image/png".equals(mimeType); in isReadonly()
|
D | DrmImageList.java | 62 long miniThumbMagic, String mimeType, long dateTaken, in DrmImage() argument 65 mimeType, dateTaken, title, displayName, rotation); in DrmImage() 105 String mimeType = cursor.getString(INDEX_MIME_TYPE); in loadImageFromCursor() local 107 contentUri(id), dataPath, 0, mimeType, 0, "DrmImage-" + id, in loadImageFromCursor()
|
/packages/apps/Contacts/src/com/android/contacts/ui/ |
D | QuickContactWindow.java | 704 public DataAction(Context context, String mimeType, DataKind kind, in DataAction() argument 708 mMimeType = mimeType; in DataAction() 711 mAlternate = Constants.MIME_SMS_ADDRESS.equals(mimeType); in DataAction() 729 if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) { in DataAction() 736 } else if (Constants.MIME_SMS_ADDRESS.equals(mimeType)) { in DataAction() 743 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) { in DataAction() 750 } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) { in DataAction() 929 final String mimeType = action.getMimeType(); in getEntry() local 930 Entry entry = mCache.get(mimeType); in getEntry() 956 mCache.put(mimeType, entry); in getEntry() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaScannerService.java | 191 private Uri scanFile(String path, String mimeType) { in scanFile() argument 200 return scanner.scanSingleFile(path, volumeName, mimeType); in scanFile() 211 public void requestScanFile(String path, String mimeType, IMediaScannerListener listener) 214 Log.d(TAG, "IMediaScannerService.scanFile: " + path + " mimeType: " + mimeType); 218 args.putString("mimetype", mimeType); 226 public void scanFile(String path, String mimeType) { 227 requestScanFile(path, mimeType, null);
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppLauncherActivity.java | 88 String mimeType = intent.getType(); in onCreate() local 90 if (mimeType != null && uris != null) { in onCreate() 92 + mimeType); in onCreate() 93 BluetoothOppManager.getInstance(this).saveSendingFileInfo(mimeType, uris); in onCreate()
|
D | Constants.java | 192 public static boolean mimeTypeMatches(String mimeType, String[] matchAgainst) { in mimeTypeMatches() argument 194 if (mimeTypeMatches(mimeType, matchType)) { in mimeTypeMatches() 201 public static boolean mimeTypeMatches(String mimeType, String matchAgainst) { in mimeTypeMatches() argument 204 return p.matcher(mimeType).matches(); in mimeTypeMatches()
|
D | BluetoothOppObexServerSession.java | 170 String name, mimeType; in onPut() local 189 mimeType = (String)request.getHeader(HeaderSet.TYPE); in onPut() 217 mimeType = type; in onPut() 220 if (mimeType == null) { in onPut() 226 if (mimeType != null) { in onPut() 227 mimeType = mimeType.toLowerCase(); in onPut() 235 && (mimeType == null || (!Constants.mimeTypeMatches(mimeType, in onPut() 256 values.put(BluetoothShare.MIMETYPE, mimeType); in onPut()
|
D | BluetoothOppManager.java | 193 public void saveSendingFileInfo(String mimeType, String uri) { in saveSendingFileInfo() argument 195 mMimeTypeOfSendigFile = mimeType; in saveSendingFileInfo() 200 public void saveSendingFileInfo(String mimeType, ArrayList<Uri> uris) { in saveSendingFileInfo() argument 202 mMimeTypeOfSendigFiles = mimeType; in saveSendingFileInfo()
|
/packages/apps/Contacts/src/com/android/contacts/ui/widget/ |
D | ContactEditorView.java | 206 final String mimeType = kind.mimeType; in setState() local 207 if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 209 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState() 216 } else if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 218 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState()
|
/packages/apps/Email/src/com/android/exchange/adapter/ |
D | ContactsSyncAdapter.java | 1011 String mimeType = cv.getAsString(Data.MIMETYPE); in findTypedData() local 1012 if (mimeType.equals(contentItemType)) { in findTypedData() 1053 String mimeType = cv.getAsString(Data.MIMETYPE); in findUntypedData() local 1054 if (mimeType.equals(contentItemType)) { in findUntypedData() 1091 public RowBuilder createBuilder(Entity entity, String mimeType, int type, in createBuilder() argument 1097 findTypedData(entity.getSubValues(), mimeType, type, stringType); in createBuilder() 1108 builder = newRowBuilder(entity, mimeType); in createBuilder() 1116 private RowBuilder typedRowBuilder(Entity entity, String mimeType, int type) { in typedRowBuilder() argument 1117 return createBuilder(entity, mimeType, type, null); in typedRowBuilder() 1120 private RowBuilder untypedRowBuilder(Entity entity, String mimeType) { in untypedRowBuilder() argument [all …]
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | ContactsUtils.java | 60 String mimeType, Cursor cursor) { in getDisplayLabel() argument 65 if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) in getDisplayLabel() 66 || Constants.MIME_SMS_ADDRESS.equals(mimeType)) { in getDisplayLabel() 68 mimeType = Phone.CONTENT_ITEM_TYPE; in getDisplayLabel() 71 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) { in getDisplayLabel() 74 } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType)) { in getDisplayLabel() 77 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) { in getDisplayLabel() 87 return getDisplayLabel(context, mimeType, type, label); in getDisplayLabel()
|