[url_launcher] suppress a uses or overrides a deprecated API
warning in WebViewActivity
#3132
Conversation
179f02c
to
645cf93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to bump the version in pubspec as well
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. |
Why google can't fix own deprecated bug?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @shinriyo, |
…g in WebViewActivity (flutter#3132)
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?