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

Commit 62152b85 authored by Yuyang Huang's avatar Yuyang Huang Committed by Automerger Merge Worker
Browse files

Merge "change onCallAdded and onCallRemoved to info level" into main am: c8c8cdf2

parents d422c36c c8c8cdf2
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");
        }
    }