OSDN Git Service

AG: CLCC response can contain non-ATD characters
authorSatish Kodishala <skodisha@codeaurora.org>
Wed, 22 Jun 2016 08:52:41 +0000 (14:22 +0530)
committerMarie Janssen <jamuraa@google.com>
Tue, 1 Nov 2016 22:37:02 +0000 (15:37 -0700)
commitc75a71d9b6012c46743099b53d172ad46e6f41d2
tree861014443d4d7ca7cf2ce6d0f03f2e0d0fa5bab6
parent3d20eb86d9b52ad517f1d15f08e8448ff60536a3
AG: CLCC response can contain non-ATD characters

Test case:
1. Connect Plantronics backbeat PRO headset.
2. Initiate outgoing call from phone.
3. Accept the call from remote side and terminate call.
4. Try to redial from headset and observe

Failure:
AG is sending error for redial request from BT headset.

Root cause:
Sometimes, the number in CLCC response has "-".
Repeated from the headset, the ATD string has "-"
which is not allowed in the dial string for ATD and
errors.

Fix:
 * Sanitize CLCC response to only include valid ATD characters.
 * Accept "-" in ATD because it works for us.

Change-Id: I854165c7da295f428852c829543eb4fc18455d91
bta/include/utl.h
bta/sys/utl.cc
btif/src/btif_hf.cc