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

Commit 01b962db authored by William Escande's avatar William Escande
Browse files

PhonePolicy: Coverity error

Unchecked_value: Using value mAdapterService.getState() as a function
argument without checking appropriately.

Bug: 328842348
Fix: 328842348
Test: None
Flag: Exempt, simple log change
Change-Id: I3d41469a39fc03819881af8fc37e9210c9a46a40
parent 79feb93e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -997,8 +997,11 @@ public class PhonePolicy implements AdapterService.BluetoothStateCallback {
            })
    private void processConnectOtherProfiles(BluetoothDevice device) {
        debugLog("processConnectOtherProfiles, device=" + device);
        if (mAdapterService.getState() != BluetoothAdapter.STATE_ON) {
            warnLog("processConnectOtherProfiles, adapter is not ON " + mAdapterService.getState());
        int currentState = mAdapterService.getState();
        if (currentState != BluetoothAdapter.STATE_ON) {
            warnLog(
                    "processConnectOtherProfiles: Bluetooth is "
                            + BluetoothAdapter.nameForState(currentState));
            return;
        }