Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed Gradle deps and removed nullability annotations.
  • Loading branch information
matthew-carroll committed Oct 31, 2019
commit a59a6da10c4268d4c40ab8d06e7cf7a92f8eb786
6 changes: 3 additions & 3 deletions packages/webview_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ afterEvaluate {
if (!containsEmbeddingDependencies) {
android {
dependencies {
def lifecycle_version = "2.1.0"
api "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
api "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
def lifecycle_version = "1.1.1"
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import android.view.View;
import android.webkit.WebStorage;
import android.webkit.WebViewClient;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
Expand All @@ -38,7 +36,7 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
BinaryMessenger messenger,
int id,
Map<String, Object> params,
@Nullable View containerView) {
View containerView) {

DisplayListenerProxy displayListenerProxy = new DisplayListenerProxy();
DisplayManager displayManager =
Expand Down Expand Up @@ -103,7 +101,7 @@ public void onInputConnectionLocked() {
// method. However leaving it raw like this means that the method will be ignored in old versions
// of Flutter but used as an override anyway wherever it's actually defined.
// TODO(mklim): Add the @Override annotation once stable passes v1.10.9.
public void onFlutterViewAttached(@NonNull View flutterView) {
public void onFlutterViewAttached(View flutterView) {
webView.setContainerView(flutterView);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.NonNull;
import androidx.webkit.WebViewClientCompat;
import io.flutter.plugin.common.MethodChannel;
import java.util.HashMap;
Expand Down Expand Up @@ -125,7 +124,7 @@ private WebViewClientCompat internalCreateWebViewClientCompat() {
return new WebViewClientCompat() {
@Override
public boolean shouldOverrideUrlLoading(
@NonNull WebView view, @NonNull WebResourceRequest request) {
WebView view, WebResourceRequest request) {
return FlutterWebViewClient.this.shouldOverrideUrlLoading(view, request);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import androidx.annotation.Nullable;

/**
* A WebView subclass that mirrors the same implementation hacks that the system WebView does in
Expand All @@ -27,14 +26,14 @@ final class InputAwareWebView extends WebView {
private static final String TAG = "InputAwareWebView";
private View threadedInputConnectionProxyView;
private ThreadedInputConnectionProxyAdapterView proxyAdapterView;
private @Nullable View containerView;
private View containerView;

InputAwareWebView(Context context, @Nullable View containerView) {
InputAwareWebView(Context context, View containerView) {
super(context);
this.containerView = containerView;
}

void setContainerView(@Nullable View containerView) {
void setContainerView(View containerView) {
this.containerView = containerView;

if (proxyAdapterView == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import android.content.Context;
import android.view.View;
import androidx.annotation.Nullable;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.StandardMessageCodec;
import io.flutter.plugin.platform.PlatformView;
Expand All @@ -15,9 +14,9 @@

public final class WebViewFactory extends PlatformViewFactory {
private final BinaryMessenger messenger;
private @Nullable final View containerView;
private final View containerView;

WebViewFactory(BinaryMessenger messenger, @Nullable View containerView) {
WebViewFactory(BinaryMessenger messenger, View containerView) {
super(StandardMessageCodec.INSTANCE);
this.messenger = messenger;
this.containerView = containerView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

package io.flutter.plugins.webviewflutter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.PluginRegistry.Registrar;
Expand All @@ -20,7 +18,7 @@
*/
public class WebViewFlutterPlugin implements FlutterPlugin {

private @Nullable FlutterCookieManager flutterCookieManager;
private FlutterCookieManager flutterCookieManager;

/**
* Add an instance of this to {@link io.flutter.embedding.engine.plugins.PluginRegistry} to
Expand Down Expand Up @@ -53,7 +51,7 @@ public static void registerWith(Registrar registrar) {
}

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
public void onAttachedToEngine(FlutterPluginBinding binding) {
BinaryMessenger messenger = binding.getFlutterEngine().getDartExecutor();
binding
.getFlutterEngine()
Expand All @@ -65,7 +63,7 @@ public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
}

@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
public void onDetachedFromEngine(FlutterPluginBinding binding) {
if (flutterCookieManager == null) {
return;
}
Expand Down