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

Commit e62db99f authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Enable debug logs for Bluetooth AdapterService

am: eaccf432

Change-Id: I3e7869b4f1c6ccd3ecf501af8737864edefa57ab
parents 57b4f6c4 eaccf432
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ import com.android.internal.app.IBatteryStats;

public class AdapterService extends Service {
    private static final String TAG = "BluetoothAdapterService";
    private static final boolean DBG = false;
    private static final boolean DBG = true;
    private static final boolean VERBOSE = false;
    private static final boolean TRACE_REF = false;
    private static final int MIN_ADVT_INSTANCES_FOR_MA = 5;
    private static final int MIN_OFFLOADED_FILTERS = 10;
@@ -2382,9 +2383,10 @@ public class AdapterService extends Service {
            }
        }

        debugLog("energyInfoCallback() status = " + status +
        verboseLog("energyInfoCallback() status = " + status +
                   "tx_time = " + tx_time + "rx_time = " + rx_time +
                "idle_time = " + idle_time + "energy_used = " + energy_used +
                   "idle_time = " + idle_time +
                   "energy_used = " + energy_used +
                   "ctrl_state = " + ctrl_state +
                   "traffic = " + Arrays.toString(data));
    }
@@ -2432,8 +2434,8 @@ public class AdapterService extends Service {
        enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);

        if (args.length > 0) {
            debugLog("dumpsys arguments, check for protobuf output: " +
                    TextUtils.join(" ", args));
            verboseLog("dumpsys arguments, check for protobuf output: "
                       + TextUtils.join(" ", args));
            if (args[0].startsWith("--proto")) {
                if (args[0].equals("--proto-java-bin")) {
                    dumpJava(fd);
@@ -2502,6 +2504,10 @@ public class AdapterService extends Service {
        if (DBG) Log.d(TAG, msg);
    }

    private void verboseLog(String msg) {
        if (VERBOSE) Log.v(TAG, msg);
    }

    private void errorLog(String msg) {
        Log.e(TAG, msg);
    }