Repository: flutter
Issue: [webview_flutter][android] builds with deprecation warnings
Labels: platform-android,p: webview,package,has reproducible steps,P3,found in release: 2.5,found in release: 2.6,team-android,triaged-android

When building the latest version of webview_flutter (2.1.2 and 2.2.0 via Github) i get the following warnings:

<details>
  <summary>Log file</summary>
  
```bash
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java:219: warning: [deprecation] onReceivedError(WebView,int,String,String) in WebViewClient has been deprecated
      public void onReceivedError(
                  ^
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java:241: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
      public boolean shouldOverrideUrlLoading(WebView view, String url) {
                     ^
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java:271: warning: [deprecation] onReceivedError(WebView,int,String,String) in WebViewClient has been deprecated
      public void onReceivedError(
                  ^
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/WebChromeClientHostApiImpl.java:44: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                               ^
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/WebChromeClientHostApiImpl.java:45: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
                  webViewClient.shouldOverrideUrlLoading(view, url);
                               ^
/Users/bever/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.2.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java:61: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                           ^
6 warnings
```
</details>

Since these functions are only used by old API devices, and new functions have been implemented and annoted for newer Android API's I think it's save to annotate these with `@SuppressWarnings("deprecation")`.

<details>
  <summary>flutter doctor -v output</summary>
  
```bash
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.1 21C5021h darwin-x64, locale nl-NL)
    • Flutter version 2.5.3 at /Users/bever/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (2 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/bever/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Users/bever/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 13.2, Build version 13C5066c
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/bever/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/bever/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7784292/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] Android Studio (version 2020.3)
    • Android Studio at /Users/bever/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7678000/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.61.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.27.0

[✓] Connected device (3 available)
    • SM F926B (mobile) • RFCR812ZT6L • android-arm64  • Android 11 (API 30)
    • macOS (desktop)   • macos       • darwin-x64     • macOS 12.1 21C5021h darwin-x64
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 95.0.4638.54

• No issues found!
```
</details>