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

Commit 08883610 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

Remove leaudio_callback_on_group_stream_status flag

Bug: 323288188
Bug: 323288608
Test: atest BluetoothLeAudioTest; atest LeAudioServiceTest;
atest --host bluetooth_le_audio_client_test
Flag: com.android.bluetooth.flags.leaudio_callback_on_group_stream_status

Change-Id: Icb7a3ca2d4caa5277488da69f56408b0aa9d986f
parent 91cb8db2
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -67,14 +67,6 @@ flag {
    bug: "322387487"
}

flag {
    name: "leaudio_callback_on_group_stream_status"
    is_exported: true
    namespace: "bluetooth"
    description: "Add group stream status callback to notify about playing state"
    bug: "323288608"
}

flag {
    name: "leaudio_multiple_vocs_instances_api"
    is_exported: true
+3 −3
Original line number Diff line number Diff line
@@ -496,8 +496,8 @@ package android.bluetooth {
    field public static final int AUDIO_LOCATION_TOP_SIDE_LEFT = 262144; // 0x40000
    field public static final int AUDIO_LOCATION_TOP_SIDE_RIGHT = 524288; // 0x80000
    field public static final String EXTRA_LE_AUDIO_GROUP_ID = "android.bluetooth.extra.LE_AUDIO_GROUP_ID";
    field @FlaggedApi("com.android.bluetooth.flags.leaudio_callback_on_group_stream_status") public static final int GROUP_STREAM_STATUS_IDLE = 0; // 0x0
    field @FlaggedApi("com.android.bluetooth.flags.leaudio_callback_on_group_stream_status") public static final int GROUP_STREAM_STATUS_STREAMING = 1; // 0x1
    field public static final int GROUP_STREAM_STATUS_IDLE = 0; // 0x0
    field public static final int GROUP_STREAM_STATUS_STREAMING = 1; // 0x1
  }

  public static interface BluetoothLeAudio.Callback {
@@ -505,7 +505,7 @@ package android.bluetooth {
    method public void onGroupNodeAdded(@NonNull android.bluetooth.BluetoothDevice, int);
    method public void onGroupNodeRemoved(@NonNull android.bluetooth.BluetoothDevice, int);
    method public void onGroupStatusChanged(int, int);
    method @FlaggedApi("com.android.bluetooth.flags.leaudio_callback_on_group_stream_status") public default void onGroupStreamStatusChanged(int, int);
    method public default void onGroupStreamStatusChanged(int, int);
  }

  public final class BluetoothLeAudioCodecConfigMetadata implements android.os.Parcelable {
+2 −10
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;
import static java.util.Objects.requireNonNull;

import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
@@ -44,8 +43,6 @@ import android.os.RemoteException;
import android.util.CloseGuard;
import android.util.Log;

import com.android.bluetooth.flags.Flags;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
@@ -145,7 +142,6 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
         * @param groupStreamStatus streaming or idle state.
         * @hide
         */
        @FlaggedApi(Flags.FLAG_LEAUDIO_CALLBACK_ON_GROUP_STREAM_STATUS)
        @SystemApi
        default void onGroupStreamStatusChanged(
                int groupId, @GroupStreamStatus int groupStreamStatus) {
@@ -184,12 +180,10 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {

        @Override
        public void onGroupStreamStatusChanged(int groupId, int groupStreamStatus) {
            if (Flags.leaudioCallbackOnGroupStreamStatus()) {
            mCallbackWrapper.forEach(
                    (cb) -> cb.onGroupStreamStatusChanged(groupId, groupStreamStatus));
        }
    }
    }

    /**
     * Intent used to broadcast the change in connection state of the LeAudio profile. Please note
@@ -657,7 +651,6 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_LEAUDIO_CALLBACK_ON_GROUP_STREAM_STATUS)
    @SystemApi
    public static final int GROUP_STREAM_STATUS_IDLE = IBluetoothLeAudio.GROUP_STREAM_STATUS_IDLE;

@@ -666,7 +659,6 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_LEAUDIO_CALLBACK_ON_GROUP_STREAM_STATUS)
    @SystemApi
    public static final int GROUP_STREAM_STATUS_STREAMING =
            IBluetoothLeAudio.GROUP_STREAM_STATUS_STREAMING;
+0 −4
Original line number Diff line number Diff line
@@ -5297,10 +5297,6 @@ public:
  }

  void notifyGroupStreamStatus(int group_id, GroupStreamStatus groupStreamStatus) {
    if (!com::android::bluetooth::flags::leaudio_callback_on_group_stream_status()) {
      return;
    }

    GroupStreamStatus newGroupStreamStatus = GroupStreamStatus::IDLE;
    if (groupStreamStatus == GroupStreamStatus::STREAMING) {
      newGroupStreamStatus = GroupStreamStatus::STREAMING;
+0 −5
Original line number Diff line number Diff line
@@ -11085,7 +11085,6 @@ TEST_F(UnicastTest, DisconnectAclBeforeGettingReadResponses) {
}
TEST_F(UnicastTest, GroupStreamStatus) {
  com::android::bluetooth::flags::provider_->leaudio_callback_on_group_stream_status(true);
  int group_id = bluetooth::groups::kGroupUnknown;
  InSequence s;
@@ -11172,8 +11171,6 @@ TEST_F(UnicastTest, GroupStreamStatus) {
}
TEST_F(UnicastTest, GroupStreamStatusManyGroups) {
  com::android::bluetooth::flags::provider_->leaudio_callback_on_group_stream_status(true);
  uint8_t group_size = 2;
  int group_id_1 = 1;
  int group_id_2 = 2;
@@ -11253,8 +11250,6 @@ TEST_F(UnicastTest, GroupStreamStatusManyGroups) {
}
TEST_F(UnicastTest, GroupStreamStatusResendAfterRemove) {
  com::android::bluetooth::flags::provider_->leaudio_callback_on_group_stream_status(true);
  uint8_t group_size = 2;
  int group_id = 1;