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

Commit 570f6eab authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Android (Google) Code Review
Browse files

Merge changes from topic "AutomotiveQBTSync" into qt-qpr1-dev

* changes:
  AVRCP Controller manage focus while disconnected
  AVRCP Controller refresh track data on Interim
  AVRCP Controller get play status
  ServiceDiscoveryProtocol DB Full
  AVRCP Position Changed Notification
  DO NOT MERGE: AVRCP Controller Shuffle/Repeat support
parents 16d70200 01423bd5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -667,7 +667,6 @@ static void btif_a2dp_sink_set_focus_state_event(
  LOG_INFO(LOG_TAG, "%s: state=%d", __func__, state);
  LockGuard lock(g_mutex);

  if (!btif_av_is_connected()) return;
  APPL_TRACE_DEBUG("%s: setting focus state to %d", __func__, state);
  btif_a2dp_sink_cb.rx_focus_state = state;
  if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_NOT_GRANTED) {
+18 −6
Original line number Diff line number Diff line
@@ -2939,11 +2939,12 @@ static void register_for_event_notification(btif_rc_supported_event_t* p_event,
    return;
  }
  // interval is only valid for AVRC_EVT_PLAY_POS_CHANGED
  uint32_t interval = 0;
  uint32_t interval_in_seconds = 0;
  if (p_event->event_id == AVRC_EVT_PLAY_POS_CHANGED) {
    interval = 2000;
    interval_in_seconds = 2;
  }
  status = register_notification_cmd(p_transaction->lbl, p_event->event_id, interval, p_dev);
  status = register_notification_cmd(p_transaction->lbl, p_event->event_id,
                                     interval_in_seconds, p_dev);
  if (status != BT_STATUS_SUCCESS) {
    BTIF_TRACE_ERROR("%s: Error in Notification registration: %d", __func__,
                     status);
@@ -3152,11 +3153,10 @@ static void handle_notification_response(tBTA_AV_META_MSG* pmeta_msg,
          break;
        } else {
          uint8_t* p_data = p_rsp->param.track;
          /* Update the UID for current track
           * Attributes will be fetched after the AVRCP procedure
           */
          BE_STREAM_TO_UINT64(p_dev->rc_playing_uid, p_data);
          get_play_status_cmd(p_dev);
          get_element_attribute_cmd(AVRC_MAX_NUM_MEDIA_ATTR_ID, attr_list,
                                    p_dev);
        }
        break;

@@ -3336,6 +3336,8 @@ static void handle_app_attr_response(tBTA_AV_META_MSG* pmeta_msg,
    rc_ctrl_procedure_complete(p_dev);
    return;
  }
  p_dev->rc_app_settings.num_attrs = 0;
  p_dev->rc_app_settings.num_ext_attrs = 0;

  for (xx = 0; xx < p_rsp->num_attr; xx++) {
    uint8_t st_index;
@@ -3807,6 +3809,10 @@ static void handle_get_playstatus_response(tBTA_AV_META_MSG* pmeta_msg,


  if (p_rsp->status == AVRC_STS_NO_ERROR) {
    do_in_jni_thread(
        FROM_HERE,
        base::Bind(bt_rc_ctrl_callbacks->play_status_changed_cb, p_dev->rc_addr,
                   (btrc_play_status_t)p_rsp->play_status));
    do_in_jni_thread(
        FROM_HERE,
        base::Bind(bt_rc_ctrl_callbacks->play_position_changed_cb,
@@ -3907,6 +3913,12 @@ static void handle_get_folder_items_response(tBTA_AV_META_MSG* pmeta_msg,
                   /* We want to make the ownership explicit in native */
                   btrc_items, item_count));

    if (item_count > 0) {
      if (btrc_items[0].item_type == AVRC_ITEM_PLAYER &&
          (p_dev->rc_features & BTA_AV_FEAT_APP_SETTING)) {
        list_player_app_setting_attrib_cmd(p_dev);
      }
    }
    /* Release the memory block for items and attributes allocated here.
     * Since the executor for do_in_jni_thread is a Single Thread Task Runner it
     * is okay to queue up the cleanup of btrc_items */
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@
#endif

#ifndef BTA_DM_SDP_DB_SIZE
#define BTA_DM_SDP_DB_SIZE 8000
#define BTA_DM_SDP_DB_SIZE 20000
#endif

#ifndef HL_INCLUDED
+1 −1
Original line number Diff line number Diff line
@@ -806,7 +806,7 @@ static tAVRC_STS avrc_ctrl_pars_vendor_rsp(tAVRC_MSG_VENDOR* p_msg,
      if (len < min_len) goto length_error;
      BE_STREAM_TO_UINT32(p_result->get_play_status.song_len, p);
      BE_STREAM_TO_UINT32(p_result->get_play_status.song_pos, p);
      BE_STREAM_TO_UINT8(p_result->get_play_status.status, p);
      BE_STREAM_TO_UINT8(p_result->get_play_status.play_status, p);
      break;

    case AVRC_PDU_SET_ADDRESSED_PLAYER: