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

Commit ff534030 authored by Limon Mia's avatar Limon Mia
Browse files

Added Tbs error codes description

Test: m com.android.btservices
Bug: 313095835
Flag: EXEMPT Added only log
Change-Id: I39ac942def4f0153efd68e85ab2a55e44939864c
parent 6224eeb5
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -804,7 +804,8 @@ public class TbsGeneric {
            synchronized (TbsGeneric.this) {
                if (DBG) {
                    Log.d(TAG, "onCallControlPointRequest: device=" + device + " opcode="
                            + opcode + " argsLen=" + args.length);
                            + callControlRequestOpcodeStr(opcode) + "(" + opcode + ")"
                            + " argsLen=" + args.length);
                }

                if (!mIsInitialized) {
@@ -950,6 +951,21 @@ public class TbsGeneric {
        }
    };

    private String callControlRequestOpcodeStr(int opcode) {
        switch (opcode) {
            case TbsGatt.CALL_CONTROL_POINT_OPCODE_ACCEPT:
                return "ACCEPT";
            case TbsGatt.CALL_CONTROL_POINT_OPCODE_TERMINATE:
                return "TERMINATE";
            case TbsGatt.CALL_CONTROL_POINT_OPCODE_LOCAL_HOLD:
                return "LOCAL_HOLD";
            case TbsGatt.CALL_CONTROL_POINT_OPCODE_LOCAL_RETRIEVE:
                return "LOCAL_RETRIEVE";
            default:
                return "UNKNOWN";
        }
    }

    private static boolean isCcidValid(int ccid) {
        return ccid != ContentControlIdKeeper.CCID_INVALID;
    }