Skip to content

Commit 1a8a9fd

Browse files
committed
fix(android): use pluginInitialize
1 parent f4b21ba commit 1a8a9fd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/android/Device.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,9 @@ public Device() {
4343
/**
4444
* Sets the context of the Command. This can then be used to do things like
4545
* get file paths associated with the Activity.
46-
*
47-
* @param cordova The context of the main Activity.
48-
* @param webView The CordovaWebView Cordova is running in.
4946
*/
50-
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
51-
super.initialize(cordova, webView);
47+
@Override
48+
protected void pluginInitialize() {
5249
Device.uuid = getUuid();
5350
}
5451

@@ -60,6 +57,7 @@ public void initialize(CordovaInterface cordova, CordovaWebView webView) {
6057
* @param callbackContext The callback id used when calling back into JavaScript.
6158
* @return True if the action was valid, false if not.
6259
*/
60+
@Override
6361
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
6462
if ("getDeviceInfo".equals(action)) {
6563
JSONObject r = new JSONObject();

0 commit comments

Comments
 (0)