Android Wear N Preview 2 (NVD83H)
Handle AT+CHLD=1 when there is no active call

Use case:
1. Connect to headset/carkit with 3-way calling support.
2. Make an incoming call or put active call on hold.
3. Send AT+CHLD=1 command from remote headset.

Failure:
AG responds with error for AT+CHLD=1 from remote since there is
no active call. Incoming ringing call is not accepted. If there
is a call on hold, it remains on hold.

Root cause:
Since there is no active call, we are returning error instead of
checking for presence of incoming or held call to make it active.

Fix:
When AT+CHLD=1 is received, end the active call if any and accept
the incoming call or make the held call to active if exists.

Change-Id: Idb81507623e26d9760c93b01c4e55ab04a746cef
1 file changed