This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[url_launcher] suppress a uses or overrides a deprecated API warning in WebViewActivity#3132
Merged
amirh merged 6 commits intoflutter:masterfrom Oct 21, 2020
Merged
[url_launcher] suppress a uses or overrides a deprecated API warning in WebViewActivity#3132amirh merged 6 commits intoflutter:masterfrom
uses or overrides a deprecated API warning in WebViewActivity#3132amirh merged 6 commits intoflutter:masterfrom
Conversation
179f02c to
645cf93
Compare
amirh
suggested changes
Oct 14, 2020
Contributor
amirh
left a comment
There was a problem hiding this comment.
Make sure to bump the version in pubspec as well
Contributor
Author
|
I changed the version in the pubspec. However I think @mnjaya might be wrong saying that my fix doesn't work. I just checked it and I don't get the warning. So maybe he/she just checked the package instead of my branch. |
Contributor
|
Why google can't fix own deprecated bug? |
Contributor
Author
Hi @shinriyo, |
This was referenced Oct 22, 2020
FlutterSu
pushed a commit
to FlutterSu/flutter-plugins
that referenced
this pull request
Nov 20, 2020
…g in WebViewActivity (flutter#3132)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Description
The url_launcher overrides the deprecated
shouldOverrideUrlLoading(WebView view, String url)method to be backwards compatible with versions before Android API 24. This however currently displays the warningWebViewActivity.java uses or overrides a deprecated API.when building for Android. This is causing some problems for developers who treat these warnings as errors as part of their build configuration.This PR addresses this issue by annotating the
shouldOverrideUrlLoading(WebView view, String url)method with the @SuppressWarnings("deprecation") attribute.Related Issues
Issue 60986
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?