You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/11/09 23:29:13 UTC

cordova-plugin-camera git commit: CB-9446 related: Removing CordovaResource library code in favour of the code we're supposed to be deprecating because that at least works.

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master f5217bf02 -> 88592575f


CB-9446 related: Removing CordovaResource library code in favour of the code we're supposed to be deprecating because that at least works.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/88592575
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/88592575
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/88592575

Branch: refs/heads/master
Commit: 88592575feb330f90a3196e552cca33f2ea0fdca
Parents: f5217bf
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Nov 9 14:27:48 2015 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Nov 9 14:28:58 2015 -0800

----------------------------------------------------------------------
 src/android/CameraLauncher.java | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/88592575/src/android/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java
index 534fc6e..fb056f4 100644
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org