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

Commit 24eabf35 authored by Yuyang Huang's avatar Yuyang Huang
Browse files

improve HFP logging

- Change log level from error to warning when a device does not have a state machine. This is a normal condition when LE audio device is active and HFP device set to null.
- remove non-necessary debug log

Bug: 352165574
Change-Id: Ib7253afae383538914beb6a4790cae32513dfb8d
Test: m packages/modules/Bluetooth
Flag: exempt, logging change
parent 4c49d759
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -847,7 +847,6 @@ public class HeadsetService extends ProfileService {
            Log.w(TAG, "getHeadsetService(): service is not available");
            return null;
        }
        logD("getHeadsetService(): returning " + sHeadsetService);
        return sHeadsetService;
    }

@@ -1341,7 +1340,7 @@ public class HeadsetService extends ProfileService {
        synchronized (mStateMachines) {
            final HeadsetStateMachine stateMachine = mStateMachines.get(device);
            if (stateMachine == null) {
                Log.e(TAG, "getHfpCallAudioPolicy(), " + device + " does not have a state machine");
                Log.w(TAG, "getHfpCallAudioPolicy(), " + device + " does not have a state machine");
                return null;
            }
            return stateMachine.getHfpCallAudioPolicy();