fix #757
This commit is contained in:
parent
22ea0091cd
commit
a0e3bc2de7
|
@ -6,6 +6,7 @@
|
||||||
- `getScale` WebView method is now deprecated. Use the new `getZoomScale` WebView method
|
- `getScale` WebView method is now deprecated. Use the new `getZoomScale` WebView method
|
||||||
- Removed `final` keyword for all `HeadlessInAppWebView` events
|
- Removed `final` keyword for all `HeadlessInAppWebView` events
|
||||||
- Fixed wrong usage of Android WebView scale property
|
- Fixed wrong usage of Android WebView scale property
|
||||||
|
- Fixed "java.lang.NullPointerException: com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewRenderProcessClient$1.success(InAppWebViewRenderProcessClient.java:37)" [#757](https://github.com/pichillilorenzo/flutter_inappwebview/issues/757)
|
||||||
|
|
||||||
## 5.2.1+1
|
## 5.2.1+1
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,16 @@ public class InAppWebViewRenderProcessClient extends WebViewRenderProcessClient
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void success(@Nullable Object response) {
|
public void success(@Nullable Object response) {
|
||||||
Map<String, Object> responseMap = (Map<String, Object>) response;
|
if (response != null) {
|
||||||
Integer action = (Integer) responseMap.get("action");
|
Map<String, Object> responseMap = (Map<String, Object>) response;
|
||||||
if (action != null && renderer != null) {
|
Integer action = (Integer) responseMap.get("action");
|
||||||
switch (action) {
|
if (action != null && renderer != null) {
|
||||||
case 0:
|
switch (action) {
|
||||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
|
case 0:
|
||||||
renderer.terminate();
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
|
||||||
break;
|
renderer.terminate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,14 +67,16 @@ public class InAppWebViewRenderProcessClient extends WebViewRenderProcessClient
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void success(@Nullable Object response) {
|
public void success(@Nullable Object response) {
|
||||||
Map<String, Object> responseMap = (Map<String, Object>) response;
|
if (response != null) {
|
||||||
Integer action = (Integer) responseMap.get("action");
|
Map<String, Object> responseMap = (Map<String, Object>) response;
|
||||||
if (action != null && renderer != null) {
|
Integer action = (Integer) responseMap.get("action");
|
||||||
switch (action) {
|
if (action != null && renderer != null) {
|
||||||
case 0:
|
switch (action) {
|
||||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
|
case 0:
|
||||||
renderer.terminate();
|
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_VIEW_RENDERER_TERMINATE))
|
||||||
break;
|
renderer.terminate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue