Fix for android 13

This commit is contained in:
Roman Volosovskyi 2023-07-05 12:34:24 +02:00
parent 9d554dd25b
commit df493332a0
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 4 additions and 2 deletions

View File

@ -288,9 +288,11 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
if (enabled) {
Context ctx = view.getContext();
if (ctx != null) {
view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath());
//view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath());
//view.getSettings().setAppCacheEnabled(true);
Util.invokeMethodIfExists(settings, "setAppCachePath", ctx.getCacheDir().getAbsolutePath());
view.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
view.getSettings().setAppCacheEnabled(true);
Util.invokeMethodIfExists(settings, "setAppCacheEnabled", true);
}
} else {
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);