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

Commit 93b3813b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Removed getMaxCodecType from BluetoothLeAudioCodecConfig, rename...

Merge "Removed getMaxCodecType from BluetoothLeAudioCodecConfig, rename functions in BluetoothLeAudioCodecStatus" am: 64fe644a

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

Change-Id: Ibd1fdbc59fd144302c3267492170a31595685852
parents 6984f5d8 64fe644a
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -919,7 +919,6 @@ package android.bluetooth {
    method public int getCodecPriority();
    method public int getCodecType();
    method public int getFrameDuration();
    method public static int getMaxCodecType();
    method public int getOctetsPerFrame();
    method public int getSampleRate();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
@@ -962,11 +961,11 @@ package android.bluetooth {
  }

  public final class BluetoothLeAudioCodecStatus implements android.os.Parcelable {
    ctor public BluetoothLeAudioCodecStatus(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig, @Nullable java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>, @Nullable java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>);
    ctor public BluetoothLeAudioCodecStatus(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>, @NonNull java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig>);
    method public int describeContents();
    method @Nullable public android.bluetooth.BluetoothLeAudioCodecConfig getCodecConfig();
    method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getCodecsLocalCapabilities();
    method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getCodecsSelectableCapabilities();
    method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getCodecLocalCapabilities();
    method @NonNull public java.util.List<android.bluetooth.BluetoothLeAudioCodecConfig> getCodecSelectableCapabilities();
    method public boolean isCodecConfigSelectable(@Nullable android.bluetooth.BluetoothLeAudioCodecConfig);
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BluetoothLeAudioCodecStatus> CREATOR;
+2 −0
Original line number Diff line number Diff line
@@ -347,7 +347,9 @@ package android.bluetooth {

  public final class BluetoothLeAudio implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile {
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getAudioLocation(@NonNull android.bluetooth.BluetoothDevice);
    method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothLeAudioCodecStatus getCodecStatus(@NonNull android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionPolicy(@Nullable android.bluetooth.BluetoothDevice);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setCodecConfigPreference(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothLeAudioCodecConfig);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public void setVolume(int);
    field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_LE_AUDIO_ACTIVE_DEVICE_CHANGED = "android.bluetooth.action.LE_AUDIO_ACTIVE_DEVICE_CHANGED";
+3 −0
Original line number Diff line number Diff line
@@ -954,6 +954,8 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
     * @return the current codec status
     * @hide
     */
    @SystemApi
    @Nullable
    @RequiresBluetoothConnectPermission
    @RequiresPermission(allOf = {
            android.Manifest.permission.BLUETOOTH_CONNECT,
@@ -977,6 +979,7 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
     * @param codecConfig the codec configuration preference
     * @hide
     */
    @SystemApi
    @RequiresBluetoothConnectPermission
    @RequiresPermission(allOf = {
            android.Manifest.permission.BLUETOOTH_CONNECT,
+0 −13
Original line number Diff line number Diff line
@@ -47,12 +47,6 @@ public final class BluetoothLeAudioCodecConfig implements Parcelable {
    public static final int SOURCE_CODEC_TYPE_LC3 = 0;
    public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000;

    /**
     * Represents the count of valid source codec types. Can be accessed via
     * {@link #getMaxCodecType}.
     */
    private static final int SOURCE_CODEC_TYPE_MAX = 1;

    /** @hide */
    @IntDef(prefix = "CODEC_PRIORITY_",
            value = {CODEC_PRIORITY_DISABLED, CODEC_PRIORITY_DEFAULT, CODEC_PRIORITY_HIGHEST})
@@ -279,13 +273,6 @@ public final class BluetoothLeAudioCodecConfig implements Parcelable {
        return mCodecType;
    }

    /**
     * Returns the valid codec types count.
     */
    public static int getMaxCodecType() {
        return SOURCE_CODEC_TYPE_MAX;
    }

    /**
     * Gets the codec name.
     *
+5 −5
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ public final class BluetoothLeAudioCodecStatus implements Parcelable {
     * @param codecsSelectableCapabilities the selectable codecs capabilities.
     */
    public BluetoothLeAudioCodecStatus(@Nullable BluetoothLeAudioCodecConfig codecConfig,
            @Nullable List<BluetoothLeAudioCodecConfig> codecsLocalCapabilities,
            @Nullable List<BluetoothLeAudioCodecConfig> codecsSelectableCapabilities) {
            @NonNull List<BluetoothLeAudioCodecConfig> codecsLocalCapabilities,
            @NonNull List<BluetoothLeAudioCodecConfig> codecsSelectableCapabilities) {
        mCodecConfig = codecConfig;
        mCodecsLocalCapabilities = codecsLocalCapabilities;
        mCodecsSelectableCapabilities = codecsSelectableCapabilities;
@@ -164,7 +164,7 @@ public final class BluetoothLeAudioCodecStatus implements Parcelable {
     */
    @Override
    public void writeToParcel(@NonNull Parcel out, int flags) {
        out.writeTypedObject(mCodecConfig, 0);
        out.writeTypedObject(mCodecConfig, flags);
        out.writeTypedList(mCodecsLocalCapabilities);
        out.writeTypedList(mCodecsSelectableCapabilities);
    }
@@ -179,7 +179,7 @@ public final class BluetoothLeAudioCodecStatus implements Parcelable {
    /**
     * Returns the codecs local capabilities.
     */
    public @NonNull List<BluetoothLeAudioCodecConfig> getCodecsLocalCapabilities() {
    public @NonNull List<BluetoothLeAudioCodecConfig> getCodecLocalCapabilities() {
        return (mCodecsLocalCapabilities == null)
                ? Collections.emptyList() : mCodecsLocalCapabilities;
    }
@@ -187,7 +187,7 @@ public final class BluetoothLeAudioCodecStatus implements Parcelable {
    /**
     * Returns the codecs selectable capabilities.
     */
    public @NonNull List<BluetoothLeAudioCodecConfig> getCodecsSelectableCapabilities() {
    public @NonNull List<BluetoothLeAudioCodecConfig> getCodecSelectableCapabilities() {
        return (mCodecsSelectableCapabilities == null)
                ? Collections.emptyList() : mCodecsSelectableCapabilities;
    }