You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2016/08/22 19:49:28 UTC
cordova-plugin-battery-status git commit: Plugin uses Android Log
class and not Cordova LOG class
Repository: cordova-plugin-battery-status
Updated Branches:
refs/heads/master f8bf8e0ad -> e11f8673e
Plugin uses Android Log class and not Cordova LOG class
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/commit/e11f8673
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/tree/e11f8673
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/diff/e11f8673
Branch: refs/heads/master
Commit: e11f8673e6c46ac824e9691b1efaf190dad5b31d
Parents: f8bf8e0
Author: Simon MacDonald <si...@gmail.com>
Authored: Mon Aug 22 15:49:19 2016 -0400
Committer: Simon MacDonald <si...@gmail.com>
Committed: Mon Aug 22 15:49:19 2016 -0400
----------------------------------------------------------------------
src/android/BatteryListener.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/e11f8673/src/android/BatteryListener.java
----------------------------------------------------------------------
diff --git a/src/android/BatteryListener.java b/src/android/BatteryListener.java
index 740a92e..e519632 100755
--- a/src/android/BatteryListener.java
+++ b/src/android/BatteryListener.java
@@ -20,6 +20,7 @@ package org.apache.cordova.batterystatus;
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;
@@ -29,7 +30,6 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.util.Log;
public class BatteryListener extends CordovaPlugin {
@@ -116,7 +116,7 @@ public class BatteryListener extends CordovaPlugin {
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);
}
}
}
@@ -133,7 +133,7 @@ public class BatteryListener extends CordovaPlugin {
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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org