Home
last modified time | relevance | path

Searched refs:inputUri (Results 1 – 3 of 3) sorted by relevance

/packages/apps/Contacts/src/com/android/contacts/util/
DContactPhotoUtils.java148 public static boolean savePhotoFromUriToUri(Context context, Uri inputUri, Uri outputUri, in savePhotoFromUriToUri() argument
150 if (inputUri == null || outputUri == null || isFilePathAndNotStorage(inputUri)) { in savePhotoFromUriToUri()
155 InputStream inputStream = context.getContentResolver().openInputStream(inputUri)) { in savePhotoFromUriToUri()
165 Log.v(TAG, "Wrote " + totalLength + " bytes for photo " + inputUri.toString()); in savePhotoFromUriToUri()
168 Log.e(TAG, "Failed to write photo: " + inputUri.toString() + " because: " + e); in savePhotoFromUriToUri()
172 context.getContentResolver().delete(inputUri, null, null); in savePhotoFromUriToUri()
182 private static boolean isFilePathAndNotStorage(Uri inputUri) { in isFilePathAndNotStorage() argument
183 if (ContentResolver.SCHEME_FILE.equals(inputUri.getScheme())) { in isFilePathAndNotStorage()
185 File file = new File(inputUri.getPath()).getCanonicalFile(); in isFilePathAndNotStorage()
/packages/apps/Contacts/src/com/android/contacts/detail/
DPhotoSelectionHandler.java243 private void doCropPhoto(Uri inputUri, Uri outputUri) { in doCropPhoto() argument
244 final Intent intent = getCropImageIntent(inputUri, outputUri); in doCropPhoto()
247 getListener().onPhotoSelected(inputUri); in doCropPhoto()
257 startPhotoActivity(intent, REQUEST_CROP_PHOTO, inputUri); in doCropPhoto()
334 private Intent getCropImageIntent(Uri inputUri, Uri outputUri) { in getCropImageIntent() argument
336 intent.setDataAndType(inputUri, "image/*"); in getCropImageIntent()
/packages/apps/Contacts/src/com/android/contacts/activities/
DAttachPhotoActivity.java182 final Uri inputUri = myIntent.getData(); in onActivityResult() local
189 if (!ContactPhotoUtils.savePhotoFromUriToUri(this, inputUri, mTempPhotoUri, false)) { in onActivityResult()