1 parent ca01909 commit 8615d7eCopy full SHA for 8615d7e
1 file changed
app/src/main/kotlin/com/google/ai/sample/MainActivity.kt
@@ -639,6 +639,12 @@ class MainActivity : ComponentActivity() {
639
val f = webViewCacheFile
640
if (f.exists() && f.length() > 0) {
641
val content = f.readText(Charsets.UTF_8)
642
+ // Invalidate cache if it still contains the old dead proxy URL.
643
+ if (content.contains("screenoperator-kilo-proxy.deno.dev")) {
644
+ Log.w(TAG, "readWebViewCache: Cache contains stale proxy URL (deno.dev) – discarding cache to force fresh load.")
645
+ f.delete()
646
+ return null
647
+ }
648
Log.d(TAG, "readWebViewCache: Loaded cached HTML ({} Zeichen).".format(content.length))
649
content
650
} else {
0 commit comments