From 4c276ba7a2aa10240cdcf029e66c4b4695e9b20c Mon Sep 17 00:00:00 2001 From: Tony Stipanic Date: Sun, 8 Oct 2023 11:52:07 +0200 Subject: [PATCH] fix: Update cache mode setting --- .../xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt | 2 +- .../src/main/java/xyz/wallpanel/app/ui/views/CustomWebView.kt | 2 +- .../src/main/java/xyz/wallpanel/app/ui/views/ScreenSaverView.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt index e3b5882..270f946 100644 --- a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt +++ b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/activities/BrowserActivityNative.kt @@ -235,7 +235,7 @@ class BrowserActivityNative : BaseBrowserActivity(), LifecycleObserver, WebClien webSettings?.databaseEnabled = true webSettings?.saveFormData = true webSettings?.javaScriptCanOpenWindowsAutomatically = true - webSettings?.setAppCacheEnabled(true) + webSettings?.cacheMode = WebSettings.LOAD_NO_CACHE webSettings?.allowFileAccess = true webSettings?.allowFileAccessFromFileURLs = true webSettings?.allowContentAccess = true diff --git a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/CustomWebView.kt b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/CustomWebView.kt index 99bb914..dfe8288 100644 --- a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/CustomWebView.kt +++ b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/CustomWebView.kt @@ -53,7 +53,7 @@ class CustomWebView @JvmOverloads constructor( settings.databaseEnabled = true settings.saveFormData = true settings.javaScriptCanOpenWindowsAutomatically = true - settings.setAppCacheEnabled(true) + settings.cacheMode = WebSettings.LOAD_NO_CACHE settings.allowFileAccess = true settings.allowFileAccessFromFileURLs = true settings.allowContentAccess = true diff --git a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/ScreenSaverView.kt b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/ScreenSaverView.kt index 3041b84..cccc0b8 100644 --- a/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/ScreenSaverView.kt +++ b/WallPanelApp/src/main/java/xyz/wallpanel/app/ui/views/ScreenSaverView.kt @@ -245,7 +245,7 @@ class ScreenSaverView : RelativeLayout { webSettings.javaScriptEnabled = true webSettings.domStorageEnabled = true webSettings.databaseEnabled = true - webSettings.setAppCacheEnabled(true) + webSettings.cacheMode = WebSettings.LOAD_NO_CACHE webSettings.javaScriptCanOpenWindowsAutomatically = true if (!TextUtils.isEmpty(userAgent)) { webSettings.userAgentString = userAgent