From 1a8a9fd4f5cea90ac286f30d682f5e94f57070fb Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Thu, 1 May 2025 00:46:06 +0900 Subject: [PATCH] fix(android): use pluginInitialize --- src/android/Device.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/android/Device.java b/src/android/Device.java index dc874f7..5aad4a8 100644 --- a/src/android/Device.java +++ b/src/android/Device.java @@ -43,12 +43,9 @@ public Device() { /** * Sets the context of the Command. This can then be used to do things like * get file paths associated with the Activity. - * - * @param cordova The context of the main Activity. - * @param webView The CordovaWebView Cordova is running in. */ - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); + @Override + protected void pluginInitialize() { Device.uuid = getUuid(); } @@ -60,6 +57,7 @@ public void initialize(CordovaInterface cordova, CordovaWebView webView) { * @param callbackContext The callback id used when calling back into JavaScript. * @return True if the action was valid, false if not. */ + @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { if ("getDeviceInfo".equals(action)) { JSONObject r = new JSONObject();