/packages/apps/ContactsCommon/src/com/android/contacts/common/model/ |
D | RawContactModifier.java | 92 final int visibleCount = state.getMimeEntriesCount(kind.mimeType, true); in canInsert() 114 RawContactDelta state, AccountType accountType, String mimeType) { in ensureKindExists() argument 115 final DataKind kind = accountType.getKindForMimetype(mimeType); in ensureKindExists() 116 final boolean hasChild = state.getMimeEntriesCount(mimeType, true) > 0; in ensureKindExists() 121 return state.getMimeEntries(mimeType).get(0); in ensureKindExists() 125 if (kind.mimeType.equals(Photo.CONTENT_ITEM_TYPE)) { in ensureKindExists() 213 final List<ValuesDelta> mimeEntries = state.getMimeEntries(kind.mimeType); in getTypeFrequencies() 371 after.put(Data.MIMETYPE, kind.mimeType); in insertChild() 432 final String mimeType = kind.mimeType; in trimEmpty() local 433 final ArrayList<ValuesDelta> entries = state.getMimeEntries(mimeType); in trimEmpty() [all …]
|
D | RawContactDelta.java | 155 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() 184 public ValuesDelta getSuperPrimaryEntry(String mimeType, boolean forceSelection) { in getSuperPrimaryEntry() argument 185 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getSuperPrimaryEntry() 246 private ArrayList<ValuesDelta> getMimeEntries(String mimeType, boolean lazyCreate) { in getMimeEntries() argument 247 ArrayList<ValuesDelta> mimeEntries = mEntries.get(mimeType); in getMimeEntries() 250 mEntries.put(mimeType, mimeEntries); in getMimeEntries() 255 public ArrayList<ValuesDelta> getMimeEntries(String mimeType) { in getMimeEntries() argument [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/print/ |
D | PrintUtils.java | 301 private static String getIconFilename(String mimeType) { in getIconFilename() argument 302 if (mimeType.startsWith("application/msword") || in getIconFilename() 303 mimeType.startsWith("application/vnd.oasis.opendocument.text") || in getIconFilename() 304 mimeType.equals("application/rtf") || in getIconFilename() 305 mimeType.equals("application/" in getIconFilename() 308 } else if (mimeType.startsWith("image/")) { in getIconFilename() 310 } else if (mimeType.startsWith("text/html")) { in getIconFilename() 312 } else if (mimeType.startsWith("application/pdf")) { in getIconFilename() 314 } else if (mimeType.endsWith("powerpoint") || in getIconFilename() 315 mimeType.equals("application/vnd.oasis.opendocument.presentation") || in getIconFilename() [all …]
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/dataitem/ |
D | DataItem.java | 60 final String mimeType = values.getAsString(Data.MIMETYPE); in createFrom() local 61 if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 63 } else if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 65 } else if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 67 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 69 } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 71 } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 73 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 75 } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() 77 } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType)) { in createFrom() [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadStorageProvider.java | 105 public String createDocument(String docId, String mimeType, String displayName) in createDocument() argument 107 if (Document.MIME_TYPE_DIR.equals(mimeType)) { in createDocument() 118 displayName = removeExtension(mimeType, displayName); in createDocument() 119 File file = new File(parent, addExtension(mimeType, displayName)); in createDocument() 124 file = new File(parent, addExtension(mimeType, displayName + " (" + n + ")")); in createDocument() 136 file.getName(), file.getName(), true, mimeType, file.getAbsolutePath(), 0L, in createDocument() 238 final String mimeType = cursor.getString( in queryRecentDocuments() local 245 if (mimeType == null in queryRecentDocuments() 246 || (mimeType.startsWith("image/") && !TextUtils.isEmpty(uri))) { in queryRecentDocuments() 297 String mimeType = cursor.getString( in includeDownloadFromCursor() local [all …]
|
D | Helpers.java | 75 String contentDisposition, String contentLocation, String mimeType, int destination) in generateSaveFile() argument 103 if (DownloadDrmHelper.isDrmConvertNeeded(mimeType)) { in generateSaveFile() 125 suffix = chooseExtensionFromMimeType(mimeType, true); in generateSaveFile() 128 suffix = chooseExtensionFromFilename(mimeType, destination, name, dotIndex); in generateSaveFile() 222 private static String chooseExtensionFromMimeType(String mimeType, boolean useDefaults) { in chooseExtensionFromMimeType() argument 224 if (mimeType != null) { in chooseExtensionFromMimeType() 225 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in chooseExtensionFromMimeType() 233 Log.v(Constants.TAG, "couldn't find extension for " + mimeType); in chooseExtensionFromMimeType() 238 if (mimeType != null && mimeType.toLowerCase().startsWith("text/")) { in chooseExtensionFromMimeType() 239 if (mimeType.equalsIgnoreCase("text/html")) { in chooseExtensionFromMimeType() [all …]
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/model/ |
D | EntityDelta.java | 150 public ValuesDelta getPrimaryEntry(String mimeType) { in getPrimaryEntry() argument 151 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getPrimaryEntry() 168 public ValuesDelta getSuperPrimaryEntry(String mimeType) { in getSuperPrimaryEntry() argument 169 return getSuperPrimaryEntry(mimeType, true); in getSuperPrimaryEntry() 178 public ValuesDelta getSuperPrimaryEntry(String mimeType, boolean forceSelection) { in getSuperPrimaryEntry() argument 179 final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); in getSuperPrimaryEntry() 206 private ArrayList<ValuesDelta> getMimeEntries(String mimeType, boolean lazyCreate) { in getMimeEntries() argument 207 ArrayList<ValuesDelta> mimeEntries = mEntries.get(mimeType); in getMimeEntries() 210 mEntries.put(mimeType, mimeEntries); in getMimeEntries() 215 public ArrayList<ValuesDelta> getMimeEntries(String mimeType) { in getMimeEntries() argument [all …]
|
/packages/apps/CertInstaller/src/com/android/certinstaller/ |
D | CertInstallerMain.java | 112 private void startInstallActivity(String mimeType, Uri uri) { in startInstallActivity() argument 113 if (mimeType == null) { in startInstallActivity() 114 mimeType = getContentResolver().getType(uri); in startInstallActivity() 122 startInstallActivity(mimeType, raw); in startInstallActivity() 132 private void startInstallActivity(String mimeType, byte[] value) { in startInstallActivity() argument 134 if ("application/x-pkcs12".equals(mimeType)) { in startInstallActivity() 136 } else if ("application/x-x509-ca-cert".equals(mimeType) in startInstallActivity() 137 || "application/x-x509-user-cert".equals(mimeType) in startInstallActivity() 138 || "application/x-x509-server-cert".equals(mimeType) in startInstallActivity() 139 || "application/x-pem-file".equals(mimeType) in startInstallActivity() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/ |
D | ContentTypeField.java | 71 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/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 248 public static boolean isSupportedByRegionDecoder(String mimeType) { in isSupportedByRegionDecoder() argument 249 if (mimeType == null) return false; in isSupportedByRegionDecoder() 250 mimeType = mimeType.toLowerCase(); in isSupportedByRegionDecoder() 251 return mimeType.startsWith("image/") && in isSupportedByRegionDecoder() 252 (!mimeType.equals("image/gif") && !mimeType.endsWith("bmp")); in isSupportedByRegionDecoder() 255 public static boolean isRotationSupported(String mimeType) { in isRotationSupported() argument 256 if (mimeType == null) return false; in isRotationSupported() 257 mimeType = mimeType.toLowerCase(); in isRotationSupported() 258 return mimeType.equals("image/jpeg"); in isRotationSupported()
|
/packages/apps/Launcher3/WallpaperPicker/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 248 public static boolean isSupportedByRegionDecoder(String mimeType) { in isSupportedByRegionDecoder() argument 249 if (mimeType == null) return false; in isSupportedByRegionDecoder() 250 mimeType = mimeType.toLowerCase(); in isSupportedByRegionDecoder() 251 return mimeType.startsWith("image/") && in isSupportedByRegionDecoder() 252 (!mimeType.equals("image/gif") && !mimeType.endsWith("bmp")); in isSupportedByRegionDecoder() 255 public static boolean isRotationSupported(String mimeType) { in isRotationSupported() argument 256 if (mimeType == null) return false; in isRotationSupported() 257 mimeType = mimeType.toLowerCase(); in isRotationSupported() 258 return mimeType.equals("image/jpeg"); in isRotationSupported()
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/ |
D | BodyDescriptor.java | 35 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/Browser/src/com/android/browser/ |
D | FetchUrlMimeType.java | 88 String mimeType = null; in run() local 98 mimeType = header.getValue(); in run() 99 final int semicolonIndex = mimeType.indexOf(';'); in run() 101 mimeType = mimeType.substring(0, semicolonIndex); in run() 121 if (mimeType != null) { in run() 122 if (mimeType.equalsIgnoreCase("text/plain") || in run() 123 mimeType.equalsIgnoreCase("application/octet-stream")) { in run() 128 mimeType = newMimeType; in run() 133 mimeType); in run()
|
/packages/apps/Exchange/src/com/android/exchange/eas/ |
D | EasSyncContacts.java | 883 final String mimeType = cv.getAsString(ContactsContract.Data.MIMETYPE); in setUpsyncCommands() local 884 if (TextUtils.isEmpty(mimeType)) { in setUpsyncCommands() 889 if (mimeType.equals(Email.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 891 } else if (mimeType.equals(Nickname.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 893 } else if (mimeType.equals(EasChildren.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 895 } else if (mimeType.equals(EasBusiness.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 897 } else if (mimeType.equals(Website.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 899 } else if (mimeType.equals(EasPersonal.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 902 } else if (mimeType.equals(Phone.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() 912 } else if (mimeType.equals(Relation.CONTENT_ITEM_TYPE)) { in setUpsyncCommands() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/utils/ |
D | MimeType.java | 126 public static String inferMimeType(String name, String mimeType) { in inferMimeType() argument 131 return mimeType; in inferMimeType() 133 final boolean isTextPlain = TEXT_PLAIN.equalsIgnoreCase(mimeType); in inferMimeType() 135 isTextPlain || GENERIC_MIMETYPE.equalsIgnoreCase(mimeType); in inferMimeType() 138 if (isGenericType || TextUtils.isEmpty(mimeType)) { in inferMimeType() 148 return !TextUtils.isEmpty(mimeType) ? mimeType : GENERIC_MIMETYPE; in inferMimeType() 159 public static boolean isEmlMimeType(String mimeType) { in isEmlMimeType() argument 160 return EML_ATTACHMENT_CONTENT_TYPES.contains(mimeType); in isEmlMimeType()
|
/packages/apps/Camera2/src/com/android/camera/ |
D | Storage.java | 111 int height, String mimeType) { in addImage() argument 117 path, width, height, mimeType); in addImage() 140 String mimeType) { in addImageToMediaStore() argument 144 height, mimeType); in addImageToMediaStore() 163 String path, int width, int height, String mimeType) { in getContentValuesForData() argument 172 values.put(ImageColumns.MIME_TYPE, mimeType); in getContentValuesForData() 240 byte[] jpeg, int width, int height, String mimeType) { in updateImage() argument 244 width, height, mimeType); in updateImage() 310 String path, int width, int height, String mimeType) { in updateImage() argument 314 width, height, mimeType); in updateImage() [all …]
|
/packages/apps/Nfc/src/com/android/nfc/handover/ |
D | HandoverTransfer.java | 195 public void finishTransfer(boolean success, Uri uri, String mimeType) { in finishTransfer() argument 201 if (DBG) Log.d(TAG, "Transfer success, uri " + uri + " mimeType " + mimeType); in finishTransfer() 203 if (mimeType == null) { in finishTransfer() 204 mimeType = MimeTypeUtil.getMimeTypeForUri(mContext, uri); in finishTransfer() 206 if (mimeType != null) { in finishTransfer() 208 mTransferMimeTypes.add(mimeType); in finishTransfer() 376 String mimeType = mTransferMimeTypes.get(i); in processFiles() local 389 mMimeTypes.put(dstFile.getAbsolutePath(), mimeType); in processFiles() local 399 String mimeType = mMimeTypes.get(mPaths.get(0)); in processFiles() local 400 if (mimeType.startsWith("image/") || mimeType.startsWith("video/") || in processFiles() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/emailcommon/internet/ |
D | MimeUtility.java | 229 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/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppObexServerSession.java | 170 String name, mimeType; in onPut() local 199 mimeType = (String)request.getHeader(HeaderSet.TYPE); in onPut() 217 if (dotIndex < 0 && mimeType == null) { in onPut() 228 mimeType = type; in onPut() 231 if (mimeType == null) { in onPut() 237 if (mimeType != null) { in onPut() 238 mimeType = mimeType.toLowerCase(); in onPut() 246 && (mimeType == null in onPut() 247 || (!isWhitelisted && !Constants.mimeTypeMatches(mimeType, in onPut() 249 || Constants.mimeTypeMatches(mimeType, in onPut() [all …]
|
/packages/apps/Email/tests/src/com/android/emailcommon/mail/ |
D | MessageTestUtils.java | 77 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/ |
D | RawContactEditorView.java | 279 final String mimeType = kind.mimeType; in setState() local 280 if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 282 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState() 289 } else if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 291 final ValuesDelta primary = state.getPrimaryEntry(mimeType); in setState() 293 } else if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 297 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) { in setState() 472 if (DataKind.PSEUDO_MIME_TYPE_DISPLAY_NAME.equals(kind.mimeType)) { in getSectionViewsWithoutFields() 476 if (DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME.equals(kind.mimeType) in getSectionViewsWithoutFields() 499 if (DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME.equals(view.getKind().mimeType)) { in showAddInformationPopupWindow()
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/fragments/ |
D | ContactFragment.java | 364 final String mimeType = entryValues.getAsString(Data.MIMETYPE); in buildEntries() local 365 if (mimeType == null) continue; in buildEntries() 367 final DataKind kind = sources.getKindOrFallback(accountType, mimeType, in buildEntries() 371 final ViewEntry entry = ViewEntry.fromValues(context, mimeType, kind, in buildEntries() 378 if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) { in buildEntries() 400 } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) { in buildEntries() 419 } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) { in buildEntries() 424 } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) { in buildEntries() 437 } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType) && in buildEntries() 457 } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) { in buildEntries() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/quickcontact/ |
D | ResolveCache.java | 123 protected Entry getEntry(String mimeType, Intent intent) { in getEntry() argument 124 Entry entry = mCache.get(mimeType); in getEntry() 128 if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType) in getEntry() 154 mCache.put(mimeType, entry); in getEntry() 199 public boolean hasResolve(String mimeType, Intent intent) { in hasResolve() argument 200 return getEntry(mimeType, intent).bestResolve != null; in hasResolve() 208 public Drawable getIcon(String mimeType, Intent intent) { in getIcon() argument 209 return getEntry(mimeType, intent).icon; in getIcon()
|
/packages/apps/Contacts/src/com/android/contacts/activities/ |
D | ConfirmAddDetailActivity.java | 386 final String mimeType = intent.resolveType(resolver); in doInBackground() local 391 if (Contacts.CONTENT_ITEM_TYPE.equals(mimeType)) { in doInBackground() 396 } else if (RawContacts.CONTENT_ITEM_TYPE.equals(mimeType)) { in doInBackground() 540 final String mimeType = cursor.getString(ExtraInfoQuery.MIMETYPE); in onQueryComplete() local 541 if (!TextUtils.isEmpty(mimeType)) { in onQueryComplete() 546 if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) { in onQueryComplete() 549 hashMapCursorData.put(mimeType, value); in onQueryComplete() 558 for (String mimeType : MIME_TYPE_PRIORITY_LIST) { in onQueryComplete() 559 if (hashMapCursorData.containsKey(mimeType)) { in onQueryComplete() 561 setExtraInfoField(hashMapCursorData.get(mimeType)); in onQueryComplete() [all …]
|
/packages/apps/Exchange/src/com/android/exchange/adapter/ |
D | ContactsSyncParser.java | 880 final String mimeType = cv.getAsString(Data.MIMETYPE); 881 if (TextUtils.equals(mimeType, contentItemType)) { 928 final String mimeType = cv.getAsString(Data.MIMETYPE); 929 if (TextUtils.equals(mimeType, contentItemType)) { 966 public RowBuilder createBuilder(Entity entity, String mimeType, int type, 972 findTypedData(entity.getSubValues(), mimeType, type, stringType); 983 builder = newRowBuilder(entity, mimeType); 991 private RowBuilder typedRowBuilder(Entity entity, String mimeType, int type) { 992 return createBuilder(entity, mimeType, type, null); 995 private RowBuilder untypedRowBuilder(Entity entity, String mimeType) { [all …]
|