File tree 1 file changed +7
-22
lines changed
app/src/main/java/com/jvdegithub/aiscatcher 1 file changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -444,29 +444,14 @@ public void onSourceChange () {
444
444
updateUIonSource ();
445
445
}
446
446
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
- }
453
447
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 ;
464
453
}
465
- } catch (Exception e ) {
466
- // If we can't determine WebView version, play it safe
467
- return true ;
468
- }
469
454
470
- return false ;
471
- }
455
+ return false ;
456
+ }
472
457
}
You can’t perform that action at this time.
0 commit comments