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

Commit c364eb3e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Enable debug logs for Bluetooth AdapterService"

parents 58107008 32a92489
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ import java.util.List;

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;
@@ -2379,9 +2380,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));
    }
@@ -2429,7 +2431,7 @@ public class AdapterService extends Service {
        enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);

        if (args.length > 0) {
            debugLog("dumpsys arguments, check for protobuf output: "
            verboseLog("dumpsys arguments, check for protobuf output: "
                       + TextUtils.join(" ", args));
            if (args[0].startsWith("--proto")) {
                if (args[0].equals("--proto-java-bin")) {
@@ -2498,6 +2500,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);
    }