OSDN Git Service

AVRCP: Don't fail in set_volume on disconnected devices
authorAjay Panicker <apanicke@google.com>
Sat, 10 Feb 2018 02:42:56 +0000 (18:42 -0800)
committerMyles Watson <mylesgw@google.com>
Mon, 12 Feb 2018 18:59:46 +0000 (18:59 +0000)
Test: Change the volume on a headset with absolute volume
Bug: 72987704
Change-Id: Ia1acd28c51707e7b71e47140aaded0298ba4e8aa

btif/src/btif_rc.cc

index b2d0ee7..e852a8c 100644 (file)
@@ -2501,12 +2501,7 @@ static bt_status_t set_volume(uint8_t volume) {
   tAVRC_STS status = BT_STATUS_UNSUPPORTED;
 
   for (int idx = 0; idx < BTIF_RC_NUM_CONN; idx++) {
-    if (!btif_rc_cb.rc_multi_cb[idx].rc_connected) {
-      status = BT_STATUS_NOT_READY;
-      BTIF_TRACE_ERROR("%s: RC is not connected for device: 0x%x", __func__,
-                       btif_rc_cb.rc_multi_cb[idx].rc_addr);
-      continue;
-    }
+    if (!btif_rc_cb.rc_multi_cb[idx].rc_connected) continue;
 
     if (btif_rc_cb.rc_multi_cb[idx].rc_volume == volume) {
       status = BT_STATUS_DONE;