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

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

leaudio: Ignore invalid MetadataUpdate am: a60f73f6 am: da9d6ae0

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

Change-Id: I3aa572f8ad7d7917cfb3cd2c4d8376ec298a26df
parents 0f8d294e da9d6ae0
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_);