File tree Expand file tree Collapse file tree
app/src/main/java/com/jvdegithub/aiscatcher Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -444,29 +444,14 @@ public void onSourceChange () {
444444 updateUIonSource ();
445445 }
446446
447- private boolean shouldUseLegacyMode () {
448- // Original API level check
449- int currentApiVersion = android .os .Build .VERSION .SDK_INT ;
450- if (currentApiVersion < android .os .Build .VERSION_CODES .N ) {
451- return true ;
452- }
453447
454- // Check WebView version for ES2022+ support
455- try {
456- PackageInfo webViewPackage = WebViewCompat .getCurrentWebViewPackage (this );
457- if (webViewPackage != null ) {
458- String version = webViewPackage .versionName ;
459- // Chrome 66 and below don't support ES2022
460- // Extract major version number and check
461- if (version != null && version .startsWith ("66." )) {
462- return true ; // Force legacy for old WebView
463- }
448+ private boolean shouldUseLegacyMode () {
449+ // Original API level check
450+ int currentApiVersion = android .os .Build .VERSION .SDK_INT ;
451+ if (currentApiVersion < Build .VERSION_CODES .Q ) {
452+ return true ;
464453 }
465- } catch (Exception e ) {
466- // If we can't determine WebView version, play it safe
467- return true ;
468- }
469454
470- return false ;
471- }
455+ return false ;
456+ }
472457 }
You can’t perform that action at this time.
0 commit comments