diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java index 627d072d..dc25667b 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(); + } + }); } /**