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

This commit is contained in:
macdonst 2013-07-11 16:34:16 -04:00
parent 1167da2027
commit e03bd0a40d

View File

@ -97,7 +97,11 @@ public class App extends CordovaPlugin {
* Clear the resource cache. * Clear the resource cache.
*/ */
public void clearCache() { 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. * Clear page history for the app.
*/ */
public void clearHistory() { public void clearHistory() {
this.webView.clearHistory(); cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
webView.clearHistory();
}
});
} }
/** /**