cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB-4155: Cordova Android - navigator.app.clearCache(); is called on (prospectively unsupported) WebViewCoreThread
Date Thu, 11 Jul 2013 20:34:43 GMT
Updated Branches:
  refs/heads/2.9.x 1167da202 -> e03bd0a40


CB-4155: Cordova Android - navigator.app.clearCache(); is called on (prospectively unsupported)
WebViewCoreThread


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

Branch: refs/heads/2.9.x
Commit: e03bd0a40d1b8bc764d2b37f1dad39627764ee27
Parents: 1167da2
Author: macdonst <simon.macdonald@gmail.com>
Authored: Thu Jul 11 16:34:16 2013 -0400
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Thu Jul 11 16:34:16 2013 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/App.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e03bd0a4/framework/src/org/apache/cordova/App.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java
index 627d072..dc25667 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -97,7 +97,11 @@ public class App extends CordovaPlugin {
      * Clear the resource cache.
      */
     public void clearCache() {
-        this.webView.clearCache(true);
+        cordova.getActivity().runOnUiThread(new Runnable() {
+            public void run() {
+                webView.clearCache(true);
+            }
+        });
     }
 
     /**
@@ -164,7 +168,11 @@ public class App extends CordovaPlugin {
      * Clear page history for the app.
      */
     public void clearHistory() {
-        this.webView.clearHistory();
+        cordova.getActivity().runOnUiThread(new Runnable() {
+            public void run() {
+                webView.clearHistory();
+            }
+        });
     }
 
     /**


Mime
View raw message