Skip to content

Commit a1304ef

Browse files
authored
[webview_flutter] Fixed todos in FlutterWebView.java (flutter#4394)
1 parent d9a4b75 commit a1304ef

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

packages/webview_flutter/webview_flutter_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.0.15
2+
3+
* Added Overrides in FlutterWebView.java
4+
15
## 2.0.14
26

37
* Update example App so navigation menu loads immediatly but only becomes available when `WebViewController` is available (same behavior as example App in webview_flutter package).

packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -188,48 +188,28 @@ public View getView() {
188188
return webView;
189189
}
190190

191-
// @Override
192-
// This is overriding a method that hasn't rolled into stable Flutter yet. Including the
193-
// annotation would cause compile time failures in versions of Flutter too old to include the new
194-
// method. However leaving it raw like this means that the method will be ignored in old versions
195-
// of Flutter but used as an override anyway wherever it's actually defined.
196-
// TODO(mklim): Add the @Override annotation once flutter/engine#9727 rolls to stable.
191+
@Override
197192
public void onInputConnectionUnlocked() {
198193
if (webView instanceof InputAwareWebView) {
199194
((InputAwareWebView) webView).unlockInputConnection();
200195
}
201196
}
202197

203-
// @Override
204-
// This is overriding a method that hasn't rolled into stable Flutter yet. Including the
205-
// annotation would cause compile time failures in versions of Flutter too old to include the new
206-
// method. However leaving it raw like this means that the method will be ignored in old versions
207-
// of Flutter but used as an override anyway wherever it's actually defined.
208-
// TODO(mklim): Add the @Override annotation once flutter/engine#9727 rolls to stable.
198+
@Override
209199
public void onInputConnectionLocked() {
210200
if (webView instanceof InputAwareWebView) {
211201
((InputAwareWebView) webView).lockInputConnection();
212202
}
213203
}
214204

215-
// @Override
216-
// This is overriding a method that hasn't rolled into stable Flutter yet. Including the
217-
// annotation would cause compile time failures in versions of Flutter too old to include the new
218-
// method. However leaving it raw like this means that the method will be ignored in old versions
219-
// of Flutter but used as an override anyway wherever it's actually defined.
220-
// TODO(mklim): Add the @Override annotation once stable passes v1.10.9.
205+
@Override
221206
public void onFlutterViewAttached(View flutterView) {
222207
if (webView instanceof InputAwareWebView) {
223208
((InputAwareWebView) webView).setContainerView(flutterView);
224209
}
225210
}
226211

227-
// @Override
228-
// This is overriding a method that hasn't rolled into stable Flutter yet. Including the
229-
// annotation would cause compile time failures in versions of Flutter too old to include the new
230-
// method. However leaving it raw like this means that the method will be ignored in old versions
231-
// of Flutter but used as an override anyway wherever it's actually defined.
232-
// TODO(mklim): Add the @Override annotation once stable passes v1.10.9.
212+
@Override
233213
public void onFlutterViewDetached() {
234214
if (webView instanceof InputAwareWebView) {
235215
((InputAwareWebView) webView).setContainerView(null);

packages/webview_flutter/webview_flutter_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: webview_flutter_android
22
description: A Flutter plugin that provides a WebView widget on Android.
33
repository: https://github.com/flutter/plugins/tree/master/packages/webview_flutter/webview_flutter_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
5-
version: 2.0.14
5+
version: 2.0.15
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)