Skip to content

Commit 6d2362e

Browse files
committed
Rename some variables and change an error message
1 parent 68ab64c commit 6d2362e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/android/ChromeCustomTabPlugin.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)