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

Commit ee27db84 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by android-build-merger
Browse files

Merge "Inform AVRCP Controller before cleaning up." into pi-dev

am: 5f354db3

Change-Id: Ie7160c610d2fc42b918fc84d1a35bcb92c1ad70a
parents e30a32c2 5f354db3
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -677,6 +677,12 @@ void handle_rc_disconnect(tBTA_AV_RC_CLOSE* p_rc_close) {
    BTIF_TRACE_ERROR("Got disconnect of unknown device");
    return;
  }
  /* report connection state if device is AVRCP target */
  if (bt_rc_ctrl_callbacks != NULL) {
    do_in_jni_thread(
        FROM_HERE, base::Bind(bt_rc_ctrl_callbacks->connection_state_cb, false,
                              false, p_dev->rc_addr));
  }
  /* Clean up AVRCP procedure flags */
  memset(&p_dev->rc_app_settings, 0, sizeof(btif_rc_player_app_settings_t));
  p_dev->rc_features_processed = false;
@@ -708,12 +714,6 @@ void handle_rc_disconnect(tBTA_AV_RC_CLOSE* p_rc_close) {
  }

  p_dev->rc_addr = RawAddress::kEmpty;
  /* report connection state if device is AVRCP target */
  if (bt_rc_ctrl_callbacks != NULL) {
    do_in_jni_thread(
        FROM_HERE, base::Bind(bt_rc_ctrl_callbacks->connection_state_cb, false,
                              false, p_dev->rc_addr));
  }
}

/***************************************************************************