OSDN Git Service

Reset reconfig and suspend flags before connecting
authorTsuyoshi Kamata <tsuyoshi.x.kamata@sonymobile.com>
Wed, 4 Mar 2015 03:09:26 +0000 (12:09 +0900)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 25 Oct 2016 21:44:54 +0000 (21:44 +0000)
When turning a carkit OFF during music playback, the flags are set to
false. After turning it back ON and re-connecting with the carkit, the
flags are not reset. This causes a potential disconnect when the pause
button is pushed on the carkit.

Bug: 28852454
Change-Id: If51c9b0a9d4180d5d3ca74963aa8186dd3f19e96

bta/av/bta_av_aact.cc

index 9867a16..7007165 100644 (file)
@@ -516,10 +516,16 @@ static void bta_av_proc_stream_evt(uint8_t handle, BD_ADDR bd_addr, uint8_t even
                     memcpy(p_msg->msg.security_cfm.p_data, p_data->security_cfm.p_data, sec_len);
                 }
                 break;
+
             case AVDT_SUSPEND_IND_EVT:
                     p_msg->msg.hdr.err_code = 0;
                 break;
 
+            case AVDT_CONNECT_IND_EVT:
+                    p_scb->recfg_sup = true;
+                    p_scb->suspend_sup = true;
+                break;
+
             default:
                 break;
             }