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

Commit da9d6ae0 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

leaudio: Ignore invalid MetadataUpdate am: a60f73f6

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1896702

Change-Id: Id2209800d7ad87504bc80c1bde2cd709642a0be6
parents 64b39270 a60f73f6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2541,6 +2541,12 @@ class LeAudioClientImpl : public LeAudioClient {
    std::vector<LeAudioContextType> contexts;

    while (track_count) {
      if (tracks->content_type == 0 && tracks->usage == 0) {
        --track_count;
        ++tracks;
        continue;
      }

      DLOG(INFO) << __func__ << ": usage=" << tracks->usage
                 << ", content_type=" << tracks->content_type
                 << ", gain=" << tracks->gain;
@@ -2553,6 +2559,11 @@ class LeAudioClientImpl : public LeAudioClient {
      ++tracks;
    }

    if (contexts.empty()) {
      DLOG(INFO) << __func__ << " invalid metadata update";
      return;
    }

    auto new_context = ChooseContextType(contexts);

    auto group = aseGroups_.FindById(active_group_id_);