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

Commit cdc736b2 authored by Yuyang Huang's avatar Yuyang Huang
Browse files

change onCallAdded and onCallRemoved to info level

Those 2 logs are critical for BT to know whether Telecom informed BT about phone calls

Bug: 358249447
Change-Id: I918fc156768395428de9317b8431eef2e0e9d44b
Test: m packages/modules/Bluetooth
Flag: exempt, logging change
parent c1601b03
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -622,10 +622,11 @@ public class BluetoothInCallService extends InCallService {
    @RequiresPermission(allOf = {BLUETOOTH_CONNECT, MODIFY_PHONE_STATE})
    public void onCallAdded(BluetoothCall call) {
        if (call.isExternalCall()) {
            Log.d(TAG, "onCallAdded: external call");
            return;
        }
        if (!mBluetoothCallHashMap.containsKey(call.getId())) {
            Log.d(TAG, "onCallAdded");
            Log.i(TAG, "onCallAdded");
            CallStateCallback callback = new CallStateCallback(call.getState());
            mCallbacks.put(call.getId(), callback);
            call.registerCallback(callback);
@@ -640,6 +641,8 @@ public class BluetoothInCallService extends InCallService {
            if (mBluetoothLeCallControl != null && tbsCall != null) {
                mBluetoothLeCallControl.onCallAdded(tbsCall);
            }
        } else {
            Log.i(TAG, "onCallAdded: call already exists");
        }
    }

@@ -688,7 +691,7 @@ public class BluetoothInCallService extends InCallService {
     */
    @RequiresPermission(allOf = {BLUETOOTH_CONNECT, MODIFY_PHONE_STATE})
    public void onCallRemoved(BluetoothCall call, boolean forceRemoveCallback) {
        Log.d(TAG, "onCallRemoved");
        Log.i(TAG, "onCallRemoved, forceRemoveCallback=" + forceRemoveCallback);
        CallStateCallback callback = getCallback(call);
        if (callback != null && (forceRemoveCallback || !call.isExternalCall())) {
            call.unregisterCallback(callback);
@@ -1334,6 +1337,8 @@ public class BluetoothInCallService extends InCallService {
                    ringingName);

            mHeadsetUpdatedRecently = true;
        } else {
            Log.i(TAG, "updateHeadsetWithCallState skipped");
        }
    }