From f2c49454da36bdab5371a744b2ba145a94a62b0c Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Mon, 22 Aug 2016 16:52:13 -0400 Subject: [PATCH] Plugin uses Android Log class and not Cordova LOG class --- src/android/StatusBar.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/android/StatusBar.java b/src/android/StatusBar.java index 16bfd90..294a5db 100644 --- a/src/android/StatusBar.java +++ b/src/android/StatusBar.java @@ -22,7 +22,6 @@ package org.apache.cordova.statusbar; import android.app.Activity; import android.graphics.Color; import android.os.Build; -import android.util.Log; import android.view.View; import android.view.Window; import android.view.WindowManager; @@ -32,6 +31,7 @@ import org.apache.cordova.CordovaArgs; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; import org.apache.cordova.PluginResult; import org.json.JSONException; @@ -47,7 +47,7 @@ public class StatusBar extends CordovaPlugin { */ @Override public void initialize(final CordovaInterface cordova, CordovaWebView webView) { - Log.v(TAG, "StatusBar: initialization"); + LOG.v(TAG, "StatusBar: initialization"); super.initialize(cordova, webView); this.cordova.getActivity().runOnUiThread(new Runnable() { @@ -74,7 +74,7 @@ public class StatusBar extends CordovaPlugin { */ @Override public boolean execute(final String action, final CordovaArgs args, final CallbackContext callbackContext) throws JSONException { - Log.v(TAG, "Executing action: " + action); + LOG.v(TAG, "Executing action: " + action); final Activity activity = this.cordova.getActivity(); final Window window = activity.getWindow(); @@ -135,7 +135,7 @@ public class StatusBar extends CordovaPlugin { try { setStatusBarBackgroundColor(args.getString(0)); } catch (JSONException ignore) { - Log.e(TAG, "Invalid hexString argument, use f.i. '#777777'"); + LOG.e(TAG, "Invalid hexString argument, use f.i. '#777777'"); } } }); @@ -156,10 +156,10 @@ public class StatusBar extends CordovaPlugin { // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 window.getClass().getDeclaredMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref)); } catch (IllegalArgumentException ignore) { - Log.e(TAG, "Invalid hexString argument, use f.i. '#999999'"); + LOG.e(TAG, "Invalid hexString argument, use f.i. '#999999'"); } catch (Exception ignore) { // this should not happen, only in case Android removes this method in a version > 21 - Log.w(TAG, "Method window.setStatusBarColor not found for SDK level " + Build.VERSION.SDK_INT); + LOG.w(TAG, "Method window.setStatusBarColor not found for SDK level " + Build.VERSION.SDK_INT); } } }