mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 12:42:50 +08:00
CB-9446 related: Removing CordovaResource library code in favour of the code we're supposed to be deprecating because that at least works.
This commit is contained in:
parent
f5217bf02b
commit
88592575fe
@ -582,19 +582,6 @@ private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* We already have shared code to resolve URIs, don't need any more.
|
||||
*/
|
||||
private String getRealFileFromUri(Uri uri)
|
||||
{
|
||||
CordovaResourceApi api = webView.getResourceApi();
|
||||
File f = api.mapUriToFile(uri);
|
||||
if(f != null)
|
||||
return "file://" + f.getAbsolutePath();
|
||||
else
|
||||
return uri.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies all needed transformation to the image received from the gallery.
|
||||
*
|
||||
@ -613,7 +600,7 @@ private String ouputModifiedBitmap(Bitmap bitmap, Uri uri) throws IOException {
|
||||
}
|
||||
int rotate = 0;
|
||||
|
||||
String fileLocation = getRealFileFromUri(uri);
|
||||
String fileLocation = FileHelper.getRealPath(uri, this.cordova);
|
||||
Log.d(LOG_TAG, "File locaton is: " + fileLocation);
|
||||
|
||||
// If you ask for video or all media type you will automatically get back a file URI
|
||||
|
Loading…
Reference in New Issue
Block a user