Home
last modified time | relevance | path

Searched refs:extension (Results 1 – 25 of 37) sorted by relevance

12

/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DHelpers.java105 String extension = null; in getFullPath() local
111 extension = ""; in getFullPath()
113 extension = filename.substring(dotIndex); in getFullPath()
120 extension = chooseExtensionFromMimeType(mimeType, true); in getFullPath()
122 extension = chooseExtensionFromFilename(mimeType, destination, filename, dotIndex); in getFullPath()
127 boolean recoveryDir = Constants.RECOVERY_DIRECTORY.equalsIgnoreCase(filename + extension); in getFullPath()
134 Log.v(Constants.TAG, "target file: " + filename + extension); in getFullPath()
139 destination, filename, extension, recoveryDir); in getFullPath()
233 String extension = null; in chooseExtensionFromMimeType() local
235 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); in chooseExtensionFromMimeType()
[all …]
DDownloadStorageProvider.java361 final String extension = name.substring(lastDot + 1); in removeExtension() local
362 final String nameMime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); in removeExtension()
374 final String extension = MimeTypeMap.getSingleton() in addExtension() local
376 if (extension != null) { in addExtension()
377 return name + "." + extension; in addExtension()
/packages/apps/Mms/src/com/android/mms/model/
DVideoModel.java76 String extension = MimeTypeMap.getFileExtensionFromUrl(mSrc); in initFromFile() local
77 if (TextUtils.isEmpty(extension)) { in initFromFile()
82 extension = mSrc.substring(dotPos + 1); in initFromFile()
85 mContentType = mimeTypeMap.getMimeTypeFromExtension(extension); in initFromFile()
123 String extension = mSrc.substring(index + 1); in initFromContentUri() local
124 if (!(TextUtils.isEmpty(extension)) && in initFromContentUri()
125 (extension.equalsIgnoreCase("3gp") || in initFromContentUri()
126 extension.equalsIgnoreCase("3gpp") || in initFromContentUri()
127 extension.equalsIgnoreCase("3g2"))) { in initFromContentUri()
/packages/apps/UnifiedEmail/src/com/android/mail/utils/
DMimeType.java121 String extension = null; in getFilenameExtension() local
125 extension = fileName.substring(lastDot + 1).toLowerCase(); in getFilenameExtension()
128 return extension; in getFilenameExtension()
142 final String extension = getFilenameExtension(name); in inferMimeType() local
143 if (TextUtils.isEmpty(extension)) { in inferMimeType()
154 type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); in inferMimeType()
158 } if (extension.equals("eml")) { in inferMimeType()
DAttachmentUtils.java104 String extension = Utils.getFileExtension(attachment.getName()); in getDisplayType() local
106 if (extension != null && extension.length() > 1 && extension.indexOf('.') == 0) { in getDisplayType()
108 extension.substring(1).toUpperCase()); in getDisplayType()
DUtils.java185 String extension = "\u2026"; // "..."; in ellipsize() local
189 extension = extension + text.substring(index + 1); in ellipsize()
192 realMax -= extension.length(); in ellipsize()
195 return text.substring(0, realMax) + extension; in ellipsize()
997 String extension = null; in getFileExtension() local
1001 extension = filename.substring(index); in getFileExtension()
1003 return extension; in getFileExtension()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppReceiveFileInfo.java143 String extension = null; in generateFileInfo() local
150 extension = ""; in generateFileInfo()
153 extension = filename.substring(dotIndex); in generateFileInfo()
158 String fullfilename = chooseUniquefilename(filename, extension); in generateFileInfo()
212 private static String chooseUniquefilename(String filename, String extension) { in chooseUniquefilename() argument
213 String fullfilename = filename + extension; in chooseUniquefilename()
233 fullfilename = filename + sequence + extension; in chooseUniquefilename()
DBluetoothOppObexServerSession.java215 String extension, type; in onPut() local
223 extension = name.substring(dotIndex + 1).toLowerCase(); in onPut()
225 type = map.getMimeTypeFromExtension(extension); in onPut()
226 … if (V) Log.v(TAG, "Mimetype guessed from extension " + extension + " is " + type); in onPut()
/packages/apps/Email/src/com/android/email/
DAttachmentInfo.java127 String extension = AttachmentUtilities.getFilenameExtension(mName); in AttachmentInfo() local
128 if (!TextUtils.isEmpty(extension) && in AttachmentInfo()
130 extension)) { in AttachmentInfo()
144 extension = AttachmentUtilities.getFilenameExtension(mName); in AttachmentInfo()
145 if (!TextUtils.isEmpty(extension) && in AttachmentInfo()
147 extension)) { in AttachmentInfo()
/packages/apps/Nfc/src/com/android/nfc/handover/
DBluetoothOppHandover.java81 String extension = MimeTypeMap.getFileExtensionFromUrl(uri.getPath()).toLowerCase(); in getMimeTypeForUri() local
82 if (extension != null) { in getMimeTypeForUri()
83 return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); in getMimeTypeForUri()
DHandoverTransfer.java441 String extension = null; in generateUniqueDestination() local
444 extension = ""; in generateUniqueDestination()
447 extension = fileName.substring(dotIndex); in generateUniqueDestination()
454 Integer.toString(count) + extension); in generateUniqueDestination()
/packages/apps/UnifiedEmail/src/org/apache/commons/io/
DFilenameUtils.java1010 public static boolean isExtension(String filename, String extension) { in isExtension() argument
1014 if (extension == null || extension.length() == 0) { in isExtension()
1018 return fileExt.equals(extension); in isExtension()
/packages/apps/Mms/src/com/android/mms/ui/
DUriImage.java93 String extension = MimeTypeMap.getFileExtensionFromUrl(mPath); in initFromFile() local
94 if (TextUtils.isEmpty(extension)) { in initFromFile()
99 extension = mPath.substring(dotPos + 1); in initFromFile()
102 mContentType = mimeTypeMap.getMimeTypeFromExtension(extension); in initFromFile()
DComposeMessageActivity.java1611 String extension; in copyPart() local
1614 extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(type); in copyPart()
1616 extension = fileName.substring(index + 1, fileName.length()); in copyPart()
1620 extension += DrmUtils.getConvertExtension(type); in copyPart()
1625 File file = getUniqueDestination(dir + fileName, extension); in copyPart()
1674 private File getUniqueDestination(String base, String extension) { in getUniqueDestination() argument
1675 File file = new File(base + "." + extension); in getUniqueDestination()
1678 file = new File(base + "_" + i + "." + extension); in getUniqueDestination()
/packages/apps/Exchange/src/com/android/exchange/adapter/
DEmailSyncParser.java529 String extension = null; in getMimeTypeFromFileName() local
531 extension = fileName.substring(lastDot + 1).toLowerCase(); in getMimeTypeFromFileName()
533 if (extension == null) { in getMimeTypeFromFileName()
537 mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); in getMimeTypeFromFileName()
539 mimeType = "application/" + extension; in getMimeTypeFromFileName()
DEmailSyncAdapter.java911 String extension = null;
913 extension = fileName.substring(lastDot + 1).toLowerCase();
915 if (extension == null) {
919 mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
921 mimeType = "application/" + extension;
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
DAttachmentUtilities.java256 String extension = null; in getFilenameExtension() local
260 extension = fileName.substring(lastDot + 1).toLowerCase(); in getFilenameExtension()
263 return extension; in getFilenameExtension()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DUriSource.java60 String extension = in getMimeType() local
63 .getMimeTypeFromExtension(extension.toLowerCase()); in getMimeType()
/packages/apps/SoundRecorder/src/com/android/soundrecorder/
DRecorder.java146 public void startRecording(int outputfileformat, String extension, Context context) { in startRecording() argument
155 mSampleFile = File.createTempFile(SAMPLE_PREFIX, extension, sampleDir); in startRecording()
/packages/apps/Browser/src/com/android/browser/
DController.java2145 String extension = mimeTypeMap.getExtensionFromMimeType(mimeType); in getTarget() local
2146 if (extension == null) { in getTarget()
2148 extension = FALLBACK_EXTENSION; in getTarget()
2150 extension = "." + extension; // createTempFile needs the '.' in getTarget()
2151 File targetFile = File.createTempFile(nameBase, extension, dir); in getTarget()
/packages/apps/ContactsCommon/src/com/android/contacts/common/vcard/
DVCardService.java163 for (String extension : additionalExtensions.split(",")) { in initExporterParams()
164 String trimed = extension.trim(); in initExporterParams()
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DEmailContent.java1428 String extension = ""; in createUniqueFile() local
1431 extension = filename.substring(index); in createUniqueFile()
1434 file = new File(directory, name + '-' + i + extension); in createUniqueFile()
/packages/apps/Camera2/src/com/android/camera/crop/
DCropActivity.java671 protected static CompressFormat convertExtensionToCompressFormat(String extension) { in convertExtensionToCompressFormat() argument
672 return extension.equals("png") ? CompressFormat.PNG : CompressFormat.JPEG; in convertExtensionToCompressFormat()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
DCropActivity.java674 protected static CompressFormat convertExtensionToCompressFormat(String extension) { in convertExtensionToCompressFormat() argument
675 return extension.equals("png") ? CompressFormat.PNG : CompressFormat.JPEG; in convertExtensionToCompressFormat()
/packages/apps/Launcher3/WallpaperPicker/src/com/android/launcher3/
DWallpaperCropActivity.java841 protected static CompressFormat convertExtensionToCompressFormat(String extension) {
842 return extension.equals("png") ? CompressFormat.PNG : CompressFormat.JPEG;

12