Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce16cea0 authored by Kiran Kelageri's avatar Kiran Kelageri
Browse files

Bluetooth-Wipower: Enable dynamic logging for A4WP

This helps to enable wipower dynamic parameters intercepted
at host to be logged via adb/command line.

Change-Id: Ibd79f4d56c99a43eab1146f4ae20155ac439cd8f
CRs=fixed: 754356
parent 75b27161
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ package android.wipower;

import android.util.Log;

import android.os.SystemProperties;


/**
  * Class holds the PRU Dynamic parameter and related attributes
@@ -53,7 +55,7 @@ public class WipowerDynamicParam {
        private byte mReserved2;

        private static final String LOGTAG = "WipowerDynamicParam";
        private static final boolean VDBG = false;
        private static boolean sDebug = false;

        private static final int MSB_MASK = 0xFF00;
        private static final int LSB_MASK = 0x00FF;
@@ -99,13 +101,14 @@ public class WipowerDynamicParam {
        * {@hide}
        */
        void print() {
            if (VDBG) Log.v(LOGTAG, "mOptValidity " +  toHex(mOptValidity) +
            sDebug = SystemProperties.getBoolean("persist.a4wp.logging", false);
            if (sDebug) Log.v(LOGTAG, "mOptValidity " +  toHex(mOptValidity) +
              "mRectVoltage " +  toHex(mRectVoltage) +  "mRectCurrent " +
              toHex(mRectCurrent) + "mOutputVoltage " +  toHex(mOutputVoltage));
            if (VDBG) Log.v(LOGTAG, "mOutputCurrent " +  toHex(mOutputCurrent) +
            if (sDebug) Log.v(LOGTAG, "mOutputCurrent " +  toHex(mOutputCurrent) +
               "mTemperature " +  toHex(mTemperature) + "mMinRectVoltageDyn " +
               toHex(mMinRectVoltageDyn) + "mMaxRectVoltageDyn " +  toHex(mMaxRectVoltageDyn));
            if (VDBG) Log.v(LOGTAG, "mSetRectVoltageDyn " +
            if (sDebug) Log.v(LOGTAG, "mSetRectVoltageDyn " +
               toHex(mSetRectVoltageDyn) + "mAlert " +  toHex(mAlert) +
               "mReserved1 " +  toHex(mReserved1) + "mReserved2 " +  toHex(mReserved2));
        }