Merge upstream PR fixes: Android crash, deprecation cleanup, security patches & more#137
Merged
Conversation
…-to-edge, security patches & more Merged fixes from upstream flutter_inappwebview PRs into our fork: - #2843/#2844 (by @Manuito83): Fix Android onWebViewCreated 50% release crash — defer JS bridge registration to View.post() in InAppWebView.prepare() — defer initial load in FlutterWebView.makeInitialLoad() - #2729 (by @NIKDISSV-Forever): Skip deprecated nav bar color APIs on Android 15+ - #2817 (by @Khairul989): Java deprecation cleanup — Handler(Looper), clearSessionCookies(), @SuppressWarnings on WebViewClient classes - #2758 (by @note11g): Fix pana analysis on pub.dev — analysis_options.yaml linter rules - #2638 (by @mustafayildiz12): Fix KeepAlive null error — remove() instead of put(null) - #2243 (by @AlexV525): CVE-2020-6563 sandbox file access protection - #2558 (by @MSOB7YY): Fix debugAssertNotDisposed() channel access in disposeChannel() - #1679 (by @zopagaduanjr): Handle HitTestResult.UNKNOWN_TYPE in onCreateWindow for window.open() calls (Android) - #2631 (by @Osama-Al-Fawaz): Remove debug print from localhost server (already clean) - Bump AGP 8.4.0 → 8.6.0 in example app
…acking The iOS package's .build directory contained Swift Package Manager index files and module caches (including a 64MB LMDB database) that should never be version-controlled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR merges fixes from multiple upstream
flutter_inappwebviewPRs that were unmerged upstream. Each fix has been adapted to align with our fork's codebase.Changes
🔴 Critical Fixes
Android
onWebViewCreated50% release crash — DeferaddJavascriptInterface()andprepareAndAddUserScripts()toView.post()so binder IPC doesn't suppress engine'sonPlatformViewCreateddispatch. Also defer initial load inmakeInitialLoad()to ensure bridge is registered before page loads.CVE-2020-6563 sandbox protection — Exclude intents that try to access
/datasandbox files via file provider.🟠 Stability & Cleanup
Android 15 edge-to-edge — Skip deprecated
setNavigationBarColor/setNavigationBarDividerColorAPIs on SDK 35+.Java deprecation cleanup —
new Handler()→new Handler(Looper.getMainLooper()), newclearSessionCookies()helper with proper SDK gating,@SuppressWarnings("deprecation")on WebView client classes.KeepAlive null error — Fix
NullPointerExceptionwhen disposing keepAlive WebViews by usingremove()instead ofput(null)and making a copy before iteration indispose().debugAssertNotDisposed()channel fix — Usethis._channeldirectly instead ofchannelgetter indisposeChannel()to avoid assertion error.onCreateWindowURL forwindow.open()— HandleHitTestResult.UNKNOWN_TYPEto properly capture URLs fromwindow.open()calls (not just anchor tags).🟡 Tooling
pana analysis fix — Update
analysis_options.yamllinter rules fromignoretofalseto fix pub.dev scoring.AGP bump — Update example app AGP from 8.4.0 → 8.6.0 to meet Flutter's minimum requirement.
📦 Files Changed
11 files modified across Android Java code, Dart platform interface, and configuration.
All Contributors
Huge thanks to the upstream PR authors whose contributions are merged here:
@Manuito83, @NIKDISSV-Forever, @Khairul989, @note11g, @mustafayildiz12, @AlexV525, @MSOB7YY, @zopagaduanjr, @Osama-Al-Fawaz