incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [32/50] git commit: Fix for CB-17: WebView caching resized pictures
Date Tue, 03 Jan 2012 18:57:10 GMT
Fix for CB-17: WebView caching resized pictures


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/3ebfb671
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/3ebfb671
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/3ebfb671

Branch: refs/heads/master
Commit: 3ebfb6717c149827f9b9b2ab2c31d5f2f44f6911
Parents: 5406d6c
Author: macdonst <simon.macdonald@gmail.com>
Authored: Tue Nov 22 05:28:40 2011 +0800
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Tue Nov 22 05:30:24 2011 +0800

----------------------------------------------------------------------
 framework/src/com/phonegap/CameraLauncher.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/3ebfb671/framework/src/com/phonegap/CameraLauncher.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/CameraLauncher.java b/framework/src/com/phonegap/CameraLauncher.java
index 0fdb08a..9dd5d0c 100755
--- a/framework/src/com/phonegap/CameraLauncher.java
+++ b/framework/src/com/phonegap/CameraLauncher.java
@@ -404,7 +404,9 @@ public class CameraLauncher extends Plugin {
                                 bitmap.recycle();
                                 bitmap = null;
                                 
-                                this.success(new PluginResult(PluginResult.Status.OK, ("file://"
+ fileName)), this.callbackId);
+                                // The resized image is cached by the app in order to get
around this and not have to delete you 
+                                // application cache I'm adding the current system time to
the end of the file url.
+                                this.success(new PluginResult(PluginResult.Status.OK, ("file://"
+ fileName + "?" + System.currentTimeMillis())), this.callbackId);
                                 System.gc();
                             } catch (Exception e) {
                                 e.printStackTrace();


Mime
View raw message