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

Commit f704d0f8 authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

AVRCP Position Changed Notification

Correct position change notification to be received every 2000 ms
instead of every 2000 s.

Bug: 133400561
Test: Connect to device and monitor avrcp traffic.
Change-Id: Id8a33670b207f4a9ac03da957075acbac0c7c052
parent a1484cc9
Loading
Loading
Loading
Loading
+4 −3
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);