mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-12 10:42:58 +08:00
CB-4155: Cordova Android - navigator.app.clearCache(); is called on (prospectively unsupported) WebViewCoreThread
This commit is contained in:
parent
1167da2027
commit
e03bd0a40d
@ -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();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user