From c9a440c5adb1543767c960596f1477308728b022 Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Fri, 29 Jan 2021 01:11:04 +0100 Subject: [PATCH] Update ChromeSafariBrowserManager.java --- .../ChromeSafariBrowserManager.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ChromeSafariBrowserManager.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ChromeSafariBrowserManager.java index 5691c63f..3526913c 100755 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ChromeSafariBrowserManager.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ChromeSafariBrowserManager.java @@ -33,19 +33,19 @@ public class ChromeSafariBrowserManager implements MethodChannel.MethodCallHandl @Override public void onMethodCall(final MethodCall call, final MethodChannel.Result result) { final Activity activity = Shared.activity; - final String uuid = call.argument("uuid"); + final String uuid = (String) call.argument("uuid"); switch (call.method) { case "open": { - String url = call.argument("url"); - HashMap options = call.argument("options"); - List> menuItemList = call.argument("menuItemList"); - String uuidFallback = call.argument("uuidFallback"); - Map headersFallback = call.argument("headersFallback"); - HashMap optionsFallback = call.argument("optionsFallback"); - HashMap contextMenuFallback = call.argument("contextMenuFallback"); - Integer windowIdFallback = call.argument("windowIdFallback"); + String url = (String) call.argument("url"); + HashMap options = (HashMap) call.argument("options"); + List> menuItemList = (List>) call.argument("menuItemList"); + String uuidFallback = (String) call.argument("uuidFallback"); + Map headersFallback = (Map) call.argument("headersFallback"); + HashMap optionsFallback = (HashMap) call.argument("optionsFallback"); + HashMap contextMenuFallback = (HashMap) call.argument("contextMenuFallback"); + Integer windowIdFallback = (Integer) call.argument("windowIdFallback"); open(activity, uuid, url, options, menuItemList, uuidFallback, headersFallback, optionsFallback, contextMenuFallback, windowIdFallback, result); } break; @@ -71,7 +71,7 @@ public class ChromeSafariBrowserManager implements MethodChannel.MethodCallHandl extras.putSerializable("menuItemList", (Serializable) menuItemList); extras.putSerializable("headers", (Serializable) headersFallback); - extras.putSerializable("contextMenu", contextMenuFallback); + extras.putSerializable("contextMenu", (Serializable) contextMenuFallback); extras.putInt("windowId", windowIdFallback != null ? windowIdFallback : -1);