Skip to content

Commit

Permalink
[webview]: Bump androidx.webkit:webkit from 1.12.0 to 1.12.1 in /pack…
Browse files Browse the repository at this point in the history
…ages/webview_flutter/webview_flutter_android/android (#7801)

Bumps androidx.webkit:webkit from 1.12.0 to 1.12.1.

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.webkit:webkit&package-manager=gradle&previous-version=1.12.0&new-version=1.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
  • Loading branch information
dependabot[bot] authored Oct 10, 2024
1 parent 791c6e3 commit f0bb953
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 34 deletions.
5 changes: 5 additions & 0 deletions packages/webview_flutter/webview_flutter_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 4.0.0

* Bumps androidx.webkit:webkit from 1.12.0 to 1.12.1.
* **Breaking Change** Bumps Android `minSdkVersion` from 19 to 21.

## 3.16.9

* Updates Java compatibility version to 11.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
compileSdk 34

defaultConfig {
minSdkVersion 19
minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -38,7 +38,7 @@ android {

dependencies {
implementation 'androidx.annotation:annotation:1.8.2'
implementation 'androidx.webkit:webkit:1.12.0'
implementation 'androidx.webkit:webkit:1.12.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:5.1.0'
testImplementation 'androidx.test:core:1.3.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

package io.flutter.plugins.webviewflutter;

import android.os.Build;
import android.webkit.WebChromeClient;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import io.flutter.plugin.common.BinaryMessenger;
import java.util.Arrays;

Expand All @@ -17,7 +15,6 @@
* <p>Passes arguments of callbacks methods from a {@link
* android.webkit.WebChromeClient.FileChooserParams} to Dart.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class FileChooserParamsFlutterApiImpl
extends GeneratedAndroidWebView.FileChooserParamsFlutterApi {
private final InstanceManager instanceManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

package io.flutter.plugins.webviewflutter;

import android.os.Build;
import android.webkit.PermissionRequest;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugins.webviewflutter.GeneratedAndroidWebView.PermissionRequestHostApi;
import java.util.List;
Expand All @@ -19,7 +17,6 @@
* <p>This class may handle instantiating and adding native object instances that are attached to a
* Dart instance or handle method calls on the associated native class or an instance of the class.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class PermissionRequestHostApiImpl implements PermissionRequestHostApi {
// To ease adding additional methods, this value is added prematurely.
@SuppressWarnings({"unused", "FieldCanBeLocal"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

package io.flutter.plugins.webviewflutter;

import android.os.Build;
import android.view.View;
import android.webkit.ConsoleMessage;
import android.webkit.GeolocationPermissions;
import android.webkit.PermissionRequest;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugins.webviewflutter.GeneratedAndroidWebView.WebChromeClientFlutterApi;
import java.util.List;
Expand Down Expand Up @@ -75,7 +73,6 @@ public void onProgressChanged(
}

/** Passes arguments from {@link WebChromeClient#onShowFileChooser} to Dart. */
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void onShowFileChooser(
@NonNull WebChromeClient webChromeClient,
@NonNull WebView webView,
Expand Down Expand Up @@ -123,7 +120,6 @@ public void onGeolocationPermissionsHidePrompt(
* Sends a message to Dart to call `WebChromeClient.onPermissionRequest` on the Dart object
* representing `instance`.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void onPermissionRequest(
@NonNull WebChromeClient instance,
@NonNull PermissionRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void onGeolocationPermissionsHidePrompt() {
flutterApi.onGeolocationPermissionsHidePrompt(this, reply -> {});
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@SuppressWarnings("LambdaLast")
@Override
public boolean onShowFileChooser(
Expand All @@ -109,7 +108,6 @@ public boolean onShowFileChooser(
return currentReturnValueForOnShowFileChooser;
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onPermissionRequest(@NonNull PermissionRequest request) {
flutterApi.onPermissionRequest(this, request, reply -> {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ static GeneratedAndroidWebView.WebResourceErrorData createWebResourceErrorData(
.build();
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
static GeneratedAndroidWebView.WebResourceRequestData createWebResourceRequestData(
WebResourceRequest request) {
final GeneratedAndroidWebView.WebResourceRequestData.Builder requestData =
Expand All @@ -71,7 +70,6 @@ static GeneratedAndroidWebView.WebResourceRequestData createWebResourceRequestDa
return requestData.build();
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
static GeneratedAndroidWebView.WebResourceResponseData createWebResourceResponseData(
WebResourceResponse response) {
final GeneratedAndroidWebView.WebResourceResponseData.Builder responseData =
Expand Down Expand Up @@ -122,7 +120,6 @@ public void onPageFinished(
}

/** Passes arguments from {@link WebViewClient#onReceivedHttpError} to Dart. */
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void onReceivedHttpError(
@NonNull WebViewClient webViewClient,
@NonNull WebView webView,
Expand Down Expand Up @@ -167,7 +164,6 @@ public void onReceivedRequestError(
* Passes arguments from {@link androidx.webkit.WebViewClientCompat#onReceivedError(WebView,
* WebResourceRequest, WebResourceError)} to Dart.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void onReceivedRequestError(
@NonNull WebViewClient webViewClient,
@NonNull WebView webView,
Expand Down Expand Up @@ -214,7 +210,6 @@ public void onReceivedError(
* Passes arguments from {@link WebViewClient#shouldOverrideUrlLoading(WebView,
* WebResourceRequest)} to Dart.
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public void requestLoading(
@NonNull WebViewClient webViewClient,
@NonNull WebView webView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package io.flutter.plugins.webviewflutter;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.os.Build;
import android.view.KeyEvent;
Expand Down Expand Up @@ -152,7 +150,6 @@ public void onPageFinished(@NonNull WebView view, @NonNull String url) {
flutterApi.onPageFinished(this, view, url, reply -> {});
}

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onReceivedHttpError(
@NonNull WebView view,
Expand All @@ -161,10 +158,6 @@ public void onReceivedHttpError(
flutterApi.onReceivedHttpError(this, view, request, response, reply -> {});
}

// This method is only called when the WebViewFeature.RECEIVE_WEB_RESOURCE_ERROR feature is
// enabled. The deprecated method is called when a device doesn't support this.
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@SuppressLint("RequiresFeature")
@Override
public void onReceivedError(
@NonNull WebView view,
Expand All @@ -185,7 +178,6 @@ public void onReceivedError(
this, view, (long) errorCode, description, failingUrl, reply -> {});
}

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean shouldOverrideUrlLoading(
@NonNull WebView view, @NonNull WebResourceRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.flutter.plugins.webviewflutter;

import android.content.Context;
import android.os.Build;
import android.os.Handler;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -109,11 +108,8 @@ private void setUp(
WebStorageHostApi.setup(
binaryMessenger,
new WebStorageHostApiImpl(instanceManager, new WebStorageHostApiImpl.WebStorageCreator()));

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
PermissionRequestHostApi.setup(
binaryMessenger, new PermissionRequestHostApiImpl(binaryMessenger, instanceManager));
}
PermissionRequestHostApi.setup(
binaryMessenger, new PermissionRequestHostApiImpl(binaryMessenger, instanceManager));
GeolocationPermissionsCallbackHostApi.setup(
binaryMessenger,
new GeolocationPermissionsCallbackHostApiImpl(binaryMessenger, instanceManager));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter_android
description: A Flutter plugin that provides a WebView widget on Android.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 3.16.9
version: 4.0.0

environment:
sdk: ^3.5.0
Expand Down

0 comments on commit f0bb953

Please sign in to comment.