@@ -91,20 +91,20 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
9191 }
9292 case "getViewHandlerPackages" : {
9393 PluginResult pluginResult ;
94- final JSONObject json = new JSONObject ();
95- json .put ("defaultHandler" , CustomTabsHelper .getDefaultViewHandlerPackageName (context ));
96- json .put ("customTabsImplementations" , new JSONArray (CustomTabsHelper .getPackagesSupportingCustomTabs (context )));
97- pluginResult = new PluginResult (PluginResult .Status .OK , json );
94+ final JSONObject result = new JSONObject ();
95+ result .put ("defaultHandler" , CustomTabsHelper .getDefaultViewHandlerPackageName (context ));
96+ result .put ("customTabsImplementations" , new JSONArray (CustomTabsHelper .getPackagesSupportingCustomTabs (context )));
97+ pluginResult = new PluginResult (PluginResult .Status .OK , result );
9898 callbackContext .sendPluginResult (pluginResult );
9999 return true ;
100100 }
101101 case "useCustomTabsImplementation" : {
102102 PluginResult pluginResult ;
103- JSONObject json = new JSONObject ();
103+ JSONObject result = new JSONObject ();
104104 final String packageName = args .optString (0 );
105105 if (TextUtils .isEmpty (packageName )) {
106- json .put ("error" , "blank packageName" );
107- pluginResult = new PluginResult (PluginResult .Status .ERROR , json );
106+ result .put ("error" , "expected argument ' packageName' to be non empty string. " );
107+ pluginResult = new PluginResult (PluginResult .Status .ERROR , result );
108108 } else {
109109 try {
110110 mCustomTabPluginHelper .setPackageNameToBind (packageName , context );
0 commit comments