From d71e6d5e841c68073868c977b0aa1affbab30553 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 6 Nov 2020 21:46:37 +0100 Subject: [PATCH] chore(android): Use CapacitorPlugin annotation in WebView plugin (#3774) --- .../src/main/java/com/getcapacitor/plugin/WebView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/WebView.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/WebView.java index d26cbc45a..c39860782 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/WebView.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/WebView.java @@ -3,12 +3,12 @@ import android.app.Activity; import android.content.SharedPreferences; import com.getcapacitor.JSObject; -import com.getcapacitor.NativePlugin; import com.getcapacitor.Plugin; import com.getcapacitor.PluginCall; import com.getcapacitor.PluginMethod; +import com.getcapacitor.annotation.CapacitorPlugin; -@NativePlugin +@CapacitorPlugin public class WebView extends Plugin { public static final String WEBVIEW_PREFS_NAME = "CapWebViewSettings"; @@ -18,7 +18,7 @@ public class WebView extends Plugin { public void setServerBasePath(PluginCall call) { String path = call.getString("path"); bridge.setServerBasePath(path); - call.success(); + call.resolve(); } @PluginMethod @@ -26,7 +26,7 @@ public void getServerBasePath(PluginCall call) { String path = bridge.getServerBasePath(); JSObject ret = new JSObject(); ret.put("path", path); - call.success(ret); + call.resolve(ret); } @PluginMethod @@ -36,6 +36,6 @@ public void persistServerBasePath(PluginCall call) { SharedPreferences.Editor editor = prefs.edit(); editor.putString(CAP_SERVER_PATH, path); editor.apply(); - call.success(); + call.resolve(); } }