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

Commit 89744b26 authored by Grzegorz Kołodziejczyk's avatar Grzegorz Kołodziejczyk Committed by Grzegorz Kolodziejczyk
Browse files

tbs: Use contact name instead of caller name as friendly name

Contact name seems to be more approperiate to be a value of friendly
name instead of caller name. Caller name from its intetion would cover
only a incoming caller name. Friendly name should cover both directions
of call initiation: incoming and outgoing.

Tag: #feature
Bug: 233349976
Test: atest TbsGenericTest
Change-Id: I888ca7a419e33306ea405a8c0caba899eac22994
parent 70bee993
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1471,8 +1471,12 @@ public class BluetoothInCallService extends InCallService {
        String uri = addressUri == null ? null : addressUri.toString();
        int callFlags = call.isIncoming() ? 0 : BluetoothLeCall.FLAG_OUTGOING_CALL;

        return new BluetoothLeCall(call.getTbsCallId(), uri, call.getCallerDisplayName(), state,
                       callFlags);
        String friendlyName = call.getCallerDisplayName();
        if (TextUtils.isEmpty(friendlyName)) {
            friendlyName = call.getContactDisplayName();
        }

        return new BluetoothLeCall(call.getTbsCallId(), uri, friendlyName, state, callFlags);
    }

    private void sendTbsCurrentCallsList() {