Skip to content

Commit

Permalink
Plugin uses Android Log class and not Cordova LOG class
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Aug 22, 2016
1 parent f8bf8e0 commit e11f867
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/android/BatteryListener.java
Expand Up @@ -20,6 +20,7 @@ Licensed to the Apache Software Foundation (ASF) under one

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.LOG;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;
Expand All @@ -29,7 +30,6 @@ Licensed to the Apache Software Foundation (ASF) under one
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;

public class BatteryListener extends CordovaPlugin {

Expand Down Expand Up @@ -116,7 +116,7 @@ private void removeBatteryListener() {
webView.getContext().unregisterReceiver(this.receiver);
this.receiver = null;
} catch (Exception e) {
Log.e(LOG_TAG, "Error unregistering battery receiver: " + e.getMessage(), e);
LOG.e(LOG_TAG, "Error unregistering battery receiver: " + e.getMessage(), e);
}
}
}
Expand All @@ -133,7 +133,7 @@ private JSONObject getBatteryInfo(Intent batteryIntent) {
obj.put("level", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_LEVEL, 0));
obj.put("isPlugged", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_PLUGGED, -1) > 0 ? true : false);
} catch (JSONException e) {
Log.e(LOG_TAG, e.getMessage(), e);
LOG.e(LOG_TAG, e.getMessage(), e);
}
return obj;
}
Expand Down

0 comments on commit e11f867

Please sign in to comment.