removed unneeded Java code obj.put(uuid, uuid) on Android

This commit is contained in:
Lorenzo Pichilli 2021-02-01 16:22:25 +01:00
parent 7879de2d4e
commit 8368483d84
10 changed files with 1 additions and 99 deletions

View File

@ -88,14 +88,12 @@ public class ChromeCustomTabsActivity extends Activity implements MethodChannel.
if (navigationEvent == TAB_SHOWN && !onChromeSafariBrowserOpened) { if (navigationEvent == TAB_SHOWN && !onChromeSafariBrowserOpened) {
onChromeSafariBrowserOpened = true; onChromeSafariBrowserOpened = true;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
obj.put("uuid", uuid);
channel.invokeMethod("onChromeSafariBrowserOpened", obj); channel.invokeMethod("onChromeSafariBrowserOpened", obj);
} }
if (navigationEvent == NAVIGATION_FINISHED && !onChromeSafariBrowserCompletedInitialLoad) { if (navigationEvent == NAVIGATION_FINISHED && !onChromeSafariBrowserCompletedInitialLoad) {
onChromeSafariBrowserCompletedInitialLoad = true; onChromeSafariBrowserCompletedInitialLoad = true;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
obj.put("uuid", uuid);
channel.invokeMethod("onChromeSafariBrowserCompletedInitialLoad", obj); channel.invokeMethod("onChromeSafariBrowserCompletedInitialLoad", obj);
} }
} }
@ -197,7 +195,6 @@ public class ChromeCustomTabsActivity extends Activity implements MethodChannel.
customTabsSession = null; customTabsSession = null;
finish(); finish();
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
obj.put("uuid", uuid);
channel.invokeMethod("onChromeSafariBrowserClosed", obj); channel.invokeMethod("onChromeSafariBrowserClosed", obj);
} }

View File

@ -120,7 +120,6 @@ public class InAppBrowserActivity extends AppCompatActivity {
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
obj.put("uuid", uuid);
channel.invokeMethod("onBrowserCreated", obj); channel.invokeMethod("onBrowserCreated", obj);
} }

View File

@ -97,7 +97,6 @@ public class FlutterWebView implements PlatformView {
if (containerView == null && id instanceof String) { if (containerView == null && id instanceof String) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
obj.put("uuid", id);
channel.invokeMethod("onHeadlessWebViewCreated", obj); channel.invokeMethod("onHeadlessWebViewCreated", obj);
} }
} }

View File

@ -822,8 +822,6 @@ final public class InAppWebView extends InputAwareWebView {
@Override @Override
public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches, boolean isDoneCounting) { public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches, boolean isDoneCounting) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("activeMatchOrdinal", activeMatchOrdinal); obj.put("activeMatchOrdinal", activeMatchOrdinal);
obj.put("numberOfMatches", numberOfMatches); obj.put("numberOfMatches", numberOfMatches);
obj.put("isDoneCounting", isDoneCounting); obj.put("isDoneCounting", isDoneCounting);
@ -928,8 +926,6 @@ final public class InAppWebView extends InputAwareWebView {
hitTestResultMap.put("extra", hitTestResult.getExtra()); hitTestResultMap.put("extra", hitTestResult.getExtra());
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("hitTestResult", hitTestResultMap); obj.put("hitTestResult", hitTestResultMap);
channel.invokeMethod("onLongPressHitTestResult", obj); channel.invokeMethod("onLongPressHitTestResult", obj);
return false; return false;
@ -1516,8 +1512,6 @@ final public class InAppWebView extends InputAwareWebView {
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("x", x); obj.put("x", x);
obj.put("y", y); obj.put("y", y);
channel.invokeMethod("onScrollChanged", obj); channel.invokeMethod("onScrollChanged", obj);
@ -1549,8 +1543,6 @@ final public class InAppWebView extends InputAwareWebView {
@Override @Override
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
channel.invokeMethod("onDownloadStart", obj); channel.invokeMethod("onDownloadStart", obj);
} }
@ -1610,8 +1602,6 @@ final public class InAppWebView extends InputAwareWebView {
hitTestResultMap.put("extra", hitTestResult.getExtra()); hitTestResultMap.put("extra", hitTestResult.getExtra());
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("hitTestResult", hitTestResultMap); obj.put("hitTestResult", hitTestResultMap);
channel.invokeMethod("onCreateContextMenu", obj); channel.invokeMethod("onCreateContextMenu", obj);
} }
@ -1724,8 +1714,6 @@ final public class InAppWebView extends InputAwareWebView {
callback.onActionItemClicked(actionMode, menuItem); callback.onActionItemClicked(actionMode, menuItem);
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("androidId", itemId); obj.put("androidId", itemId);
obj.put("iosId", null); obj.put("iosId", null);
obj.put("title", itemTitle); obj.put("title", itemTitle);
@ -1750,8 +1738,6 @@ final public class InAppWebView extends InputAwareWebView {
hideContextMenu(); hideContextMenu();
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("androidId", itemId); obj.put("androidId", itemId);
obj.put("iosId", null); obj.put("iosId", null);
obj.put("title", itemTitle); obj.put("title", itemTitle);
@ -1837,8 +1823,6 @@ final public class InAppWebView extends InputAwareWebView {
public void onHideContextMenu() { public void onHideContextMenu() {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onHideContextMenu", obj); channel.invokeMethod("onHideContextMenu", obj);
} }

View File

@ -139,8 +139,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
this.mCustomViewCallback = null; this.mCustomViewCallback = null;
activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onExitFullscreen", obj); channel.invokeMethod("onExitFullscreen", obj);
} }
@ -169,8 +167,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
((FrameLayout) decorView).addView(this.mCustomView, FULLSCREEN_LAYOUT_PARAMS); ((FrameLayout) decorView).addView(this.mCustomView, FULLSCREEN_LAYOUT_PARAMS);
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onEnterFullscreen", obj); channel.invokeMethod("onEnterFullscreen", obj);
} }
@ -178,8 +174,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
public boolean onJsAlert(final WebView view, String url, final String message, public boolean onJsAlert(final WebView view, String url, final String message,
final JsResult result) { final JsResult result) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("message", message); obj.put("message", message);
obj.put("iosIsMainFrame", null); obj.put("iosIsMainFrame", null);
@ -265,8 +259,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
public boolean onJsConfirm(final WebView view, String url, final String message, public boolean onJsConfirm(final WebView view, String url, final String message,
final JsResult result) { final JsResult result) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("message", message); obj.put("message", message);
obj.put("iosIsMainFrame", null); obj.put("iosIsMainFrame", null);
@ -365,8 +357,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
public boolean onJsPrompt(final WebView view, String url, final String message, public boolean onJsPrompt(final WebView view, String url, final String message,
final String defaultValue, final JsPromptResult result) { final String defaultValue, final JsPromptResult result) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("message", message); obj.put("message", message);
obj.put("defaultValue", defaultValue); obj.put("defaultValue", defaultValue);
@ -487,8 +477,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
public boolean onJsBeforeUnload(final WebView view, String url, final String message, public boolean onJsBeforeUnload(final WebView view, String url, final String message,
final JsResult result) { final JsResult result) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("message", message); obj.put("message", message);
obj.put("iosIsMainFrame", null); obj.put("iosIsMainFrame", null);
@ -592,8 +580,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
String url = result.getExtra(); String url = result.getExtra();
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("windowId", windowId); obj.put("windowId", windowId);
obj.put("androidIsDialog", isDialog); obj.put("androidIsDialog", isDialog);
@ -636,9 +622,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
@Override @Override
public void onCloseWindow(WebView window) { public void onCloseWindow(WebView window) {
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onCloseWindow", obj); channel.invokeMethod("onCloseWindow", obj);
super.onCloseWindow(window); super.onCloseWindow(window);
@ -647,9 +630,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
@Override @Override
public void onRequestFocus(WebView view) { public void onRequestFocus(WebView view) {
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onRequestFocus", obj); channel.invokeMethod("onRequestFocus", obj);
super.onCloseWindow(view); super.onCloseWindow(view);
@ -658,8 +638,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
@Override @Override
public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) { public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("origin", origin); obj.put("origin", origin);
channel.invokeMethod("onGeolocationPermissionsShowPrompt", obj, new MethodChannel.Result() { channel.invokeMethod("onGeolocationPermissionsShowPrompt", obj, new MethodChannel.Result() {
@Override @Override
@ -686,16 +664,12 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
@Override @Override
public void onGeolocationPermissionsHidePrompt() { public void onGeolocationPermissionsHidePrompt() {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
channel.invokeMethod("onGeolocationPermissionsHidePrompt", obj); channel.invokeMethod("onGeolocationPermissionsHidePrompt", obj);
} }
@Override @Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) { public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("message", consoleMessage.message()); obj.put("message", consoleMessage.message());
obj.put("messageLevel", consoleMessage.messageLevel().ordinal()); obj.put("messageLevel", consoleMessage.messageLevel().ordinal());
channel.invokeMethod("onConsoleMessage", obj); channel.invokeMethod("onConsoleMessage", obj);
@ -717,8 +691,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("progress", progress); obj.put("progress", progress);
channel.invokeMethod("onProgressChanged", obj); channel.invokeMethod("onProgressChanged", obj);
@ -733,8 +705,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("title", title); obj.put("title", title);
channel.invokeMethod("onTitleChanged", obj); channel.invokeMethod("onTitleChanged", obj);
} }
@ -757,8 +727,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
icon.recycle(); icon.recycle();
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("icon", byteArrayOutputStream.toByteArray()); obj.put("icon", byteArrayOutputStream.toByteArray());
channel.invokeMethod("onReceivedIcon", obj); channel.invokeMethod("onReceivedIcon", obj);
} }
@ -770,8 +738,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
super.onReceivedTouchIconUrl(view, url, precomposed); super.onReceivedTouchIconUrl(view, url, precomposed);
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("precomposed", precomposed); obj.put("precomposed", precomposed);
channel.invokeMethod("onReceivedTouchIconUrl", obj); channel.invokeMethod("onReceivedTouchIconUrl", obj);
@ -1142,8 +1108,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
public void onPermissionRequest(final PermissionRequest request) { public void onPermissionRequest(final PermissionRequest request) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("origin", request.getOrigin().toString()); obj.put("origin", request.getOrigin().toString());
obj.put("resources", Arrays.asList(request.getResources())); obj.put("resources", Arrays.asList(request.getResources()));
channel.invokeMethod("onPermissionRequest", obj, new MethodChannel.Result() { channel.invokeMethod("onPermissionRequest", obj, new MethodChannel.Result() {

View File

@ -115,8 +115,6 @@ public class InAppWebViewClient extends WebViewClient {
public void onShouldOverrideUrlLoading(final InAppWebView webView, final String url, final String method, final Map<String, String> headers, public void onShouldOverrideUrlLoading(final InAppWebView webView, final String url, final String method, final Map<String, String> headers,
final boolean isForMainFrame, boolean hasGesture, boolean isRedirect) { final boolean isForMainFrame, boolean hasGesture, boolean isRedirect) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("method", method); obj.put("method", method);
obj.put("headers", headers); obj.put("headers", headers);
@ -264,8 +262,6 @@ public class InAppWebViewClient extends WebViewClient {
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
channel.invokeMethod("onLoadStart", obj); channel.invokeMethod("onLoadStart", obj);
} }
@ -298,8 +294,6 @@ public class InAppWebViewClient extends WebViewClient {
} }
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
channel.invokeMethod("onLoadStop", obj); channel.invokeMethod("onLoadStop", obj);
} }
@ -307,8 +301,6 @@ public class InAppWebViewClient extends WebViewClient {
@Override @Override
public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) { public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("androidIsReload", isReload); obj.put("androidIsReload", isReload);
channel.invokeMethod("onUpdateVisitedHistory", obj); channel.invokeMethod("onUpdateVisitedHistory", obj);
@ -331,8 +323,6 @@ public class InAppWebViewClient extends WebViewClient {
credentialsProposed = null; credentialsProposed = null;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", failingUrl); obj.put("url", failingUrl);
obj.put("code", errorCode); obj.put("code", errorCode);
obj.put("message", description); obj.put("message", description);
@ -347,8 +337,6 @@ public class InAppWebViewClient extends WebViewClient {
super.onReceivedHttpError(view, request, errorResponse); super.onReceivedHttpError(view, request, errorResponse);
if(request.isForMainFrame()) { if(request.isForMainFrame()) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", request.getUrl().toString()); obj.put("url", request.getUrl().toString());
obj.put("statusCode", errorResponse.getStatusCode()); obj.put("statusCode", errorResponse.getStatusCode());
obj.put("description", errorResponse.getReasonPhrase()); obj.put("description", errorResponse.getReasonPhrase());
@ -381,8 +369,6 @@ public class InAppWebViewClient extends WebViewClient {
previousAuthRequestFailureCount++; previousAuthRequestFailureCount++;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("host", host); obj.put("host", host);
obj.put("protocol", protocol); obj.put("protocol", protocol);
obj.put("realm", realm); obj.put("realm", realm);
@ -460,8 +446,6 @@ public class InAppWebViewClient extends WebViewClient {
final int port = url.getPort(); final int port = url.getPort();
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("host", host); obj.put("host", host);
obj.put("protocol", protocol); obj.put("protocol", protocol);
obj.put("realm", realm); obj.put("realm", realm);
@ -545,8 +529,6 @@ public class InAppWebViewClient extends WebViewClient {
final String realm = null; final String realm = null;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("host", request.getHost()); obj.put("host", request.getHost());
obj.put("protocol", protocol); obj.put("protocol", protocol);
obj.put("realm", realm); obj.put("realm", realm);
@ -603,8 +585,6 @@ public class InAppWebViewClient extends WebViewClient {
webView.scale = newScale; webView.scale = newScale;
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("oldScale", oldScale); obj.put("oldScale", oldScale);
obj.put("newScale", newScale); obj.put("newScale", newScale);
channel.invokeMethod("onScaleChanged", obj); channel.invokeMethod("onScaleChanged", obj);
@ -614,8 +594,6 @@ public class InAppWebViewClient extends WebViewClient {
@Override @Override
public void onSafeBrowsingHit(final WebView view, final WebResourceRequest request, final int threatType, final SafeBrowsingResponse callback) { public void onSafeBrowsingHit(final WebView view, final WebResourceRequest request, final int threatType, final SafeBrowsingResponse callback) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", request.getUrl().toString()); obj.put("url", request.getUrl().toString());
obj.put("threatType", threatType); obj.put("threatType", threatType);
@ -691,8 +669,6 @@ public class InAppWebViewClient extends WebViewClient {
if (webView.options.resourceCustomSchemes != null && webView.options.resourceCustomSchemes.contains(scheme)) { if (webView.options.resourceCustomSchemes != null && webView.options.resourceCustomSchemes.contains(scheme)) {
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("scheme", scheme); obj.put("scheme", scheme);
@ -770,8 +746,6 @@ public class InAppWebViewClient extends WebViewClient {
} }
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
obj.put("method", method); obj.put("method", method);
obj.put("headers", headers); obj.put("headers", headers);
@ -814,8 +788,6 @@ public class InAppWebViewClient extends WebViewClient {
@Override @Override
public void onFormResubmission (final WebView view, final Message dontResend, final Message resend) { public void onFormResubmission (final WebView view, final Message dontResend, final Message resend) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", view.getUrl()); obj.put("url", view.getUrl());
channel.invokeMethod("onFormResubmission", obj, new MethodChannel.Result() { channel.invokeMethod("onFormResubmission", obj, new MethodChannel.Result() {
@ -857,8 +829,6 @@ public class InAppWebViewClient extends WebViewClient {
public void onPageCommitVisible(WebView view, String url) { public void onPageCommitVisible(WebView view, String url) {
super.onPageCommitVisible(view, url); super.onPageCommitVisible(view, url);
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", url); obj.put("url", url);
channel.invokeMethod("onPageCommitVisible", obj); channel.invokeMethod("onPageCommitVisible", obj);
} }
@ -873,8 +843,6 @@ public class InAppWebViewClient extends WebViewClient {
Integer rendererPriorityAtExit = detail.rendererPriorityAtExit(); Integer rendererPriorityAtExit = detail.rendererPriorityAtExit();
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("didCrash", didCrash); obj.put("didCrash", didCrash);
obj.put("rendererPriorityAtExit", rendererPriorityAtExit); obj.put("rendererPriorityAtExit", rendererPriorityAtExit);
@ -889,8 +857,6 @@ public class InAppWebViewClient extends WebViewClient {
@Override @Override
public void onReceivedLoginRequest(WebView view, String realm, String account, String args) { public void onReceivedLoginRequest(WebView view, String realm, String account, String args) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("realm", realm); obj.put("realm", realm);
obj.put("account", account); obj.put("account", account);
obj.put("args", args); obj.put("args", args);

View File

@ -35,8 +35,6 @@ public class InAppWebViewRenderProcessClient extends WebViewRenderProcessClient
@Override @Override
public void onRenderProcessUnresponsive(@NonNull WebView view, @Nullable final WebViewRenderProcess renderer) { public void onRenderProcessUnresponsive(@NonNull WebView view, @Nullable final WebViewRenderProcess renderer) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", view.getUrl()); obj.put("url", view.getUrl());
channel.invokeMethod("onRenderProcessUnresponsive", obj, new MethodChannel.Result() { channel.invokeMethod("onRenderProcessUnresponsive", obj, new MethodChannel.Result() {
@ -69,8 +67,6 @@ public class InAppWebViewRenderProcessClient extends WebViewRenderProcessClient
@Override @Override
public void onRenderProcessResponsive(@NonNull WebView view, @Nullable final WebViewRenderProcess renderer) { public void onRenderProcessResponsive(@NonNull WebView view, @Nullable final WebViewRenderProcess renderer) {
Map<String, Object> obj = new HashMap<>(); Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("url", view.getUrl()); obj.put("url", view.getUrl());
channel.invokeMethod("onRenderProcessResponsive", obj, new MethodChannel.Result() { channel.invokeMethod("onRenderProcessResponsive", obj, new MethodChannel.Result() {

View File

@ -72,8 +72,6 @@ public class JavaScriptBridgeInterface {
final InAppWebView webView = (inAppBrowserActivity != null) ? inAppBrowserActivity.webView : flutterWebView.webView; final InAppWebView webView = (inAppBrowserActivity != null) ? inAppBrowserActivity.webView : flutterWebView.webView;
final Map<String, Object> obj = new HashMap<>(); final Map<String, Object> obj = new HashMap<>();
if (inAppBrowserActivity != null)
obj.put("uuid", inAppBrowserActivity.uuid);
obj.put("handlerName", handlerName); obj.put("handlerName", handlerName);
obj.put("args", args); obj.put("args", args);

View File

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.0-nullsafety.2/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":["device_info"]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/.pub-cache/git/plugins-16f3281b04b0db12e609352b1c9544901392e428/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.4/","dependencies":[]}],"android":[{"name":"device_info","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.0-nullsafety.2/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":["device_info"]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/.pub-cache/git/plugins-16f3281b04b0db12e609352b1c9544901392e428/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.4/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+8/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.1.0-nullsafety.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"url_launcher_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.1.0-nullsafety.3/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]},{"name":"url_launcher_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-0.1.0-nullsafety.2/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inappwebview","dependencies":["device_info"]},{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-02-01 14:15:06.451560","version":"1.26.0-18.0.pre.90"} {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.0-nullsafety.2/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":["device_info"]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/.pub-cache/git/plugins-16f3281b04b0db12e609352b1c9544901392e428/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.4/","dependencies":[]}],"android":[{"name":"device_info","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.0-nullsafety.2/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":["device_info"]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/.pub-cache/git/plugins-16f3281b04b0db12e609352b1c9544901392e428/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.4/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+8/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.1.0-nullsafety.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"url_launcher_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.1.0-nullsafety.3/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]},{"name":"url_launcher_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-0.1.0-nullsafety.2/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inappwebview","dependencies":["device_info"]},{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-02-01 16:16:01.302566","version":"1.26.0-18.0.pre.90"}

View File

@ -22,7 +22,6 @@ class MyInAppBrowser extends InAppBrowser {
@override @override
Future onLoadStop(url) async { Future onLoadStop(url) async {
print(await this.webViewController.getTitle());
print("\n\nStopped $url\n\n"); print("\n\nStopped $url\n\n");
} }