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

Commit eb01666b authored by William Escande's avatar William Escande
Browse files

cherry-pick of aosp/1959811

Due to bigest topic on aosp, the cl has not been merged in internal
This CL is only to reduce merge-conflict between aosp and internal
Test: build

Change-Id: I47edabfbcbd2eb15650194d6234f54c16d74ed07
parent 79d81ab2
Loading
Loading
Loading
Loading
+4 −19
Original line number Diff line number Diff line
@@ -15,39 +15,24 @@
 */
package android.media;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.bluetooth.BluetoothProfile;
import android.os.Parcel;
import android.os.Parcelable;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Contains information about Bluetooth profile connection state changed
 * {@hide}
 */
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public final class BtProfileConnectionInfo implements Parcelable {
    /** @hide */
    @IntDef({
            BluetoothProfile.A2DP,
            BluetoothProfile.A2DP_SINK,
            BluetoothProfile.HEADSET, // Can only be set by BtHelper
            BluetoothProfile.HEARING_AID,
            BluetoothProfile.LE_AUDIO,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface BtProfile {}

    private final @BtProfile int mProfile;
    private final int mProfile;
    private final boolean mSupprNoisy;
    private final int mVolume;
    private final boolean mIsLeOutput;

    private BtProfileConnectionInfo(@BtProfile int profile, boolean suppressNoisyIntent, int volume,
    private BtProfileConnectionInfo(int profile, boolean suppressNoisyIntent, int volume,
            boolean isLeOutput) {
        mProfile = profile;
        mSupprNoisy = suppressNoisyIntent;
@@ -59,7 +44,7 @@ public final class BtProfileConnectionInfo implements Parcelable {
     * Constructor used by BtHelper when a profile is connected
     * {@hide}
     */
    public BtProfileConnectionInfo(@BtProfile int profile) {
    public BtProfileConnectionInfo(int profile) {
        this(profile, false, -1, false);
    }

@@ -142,7 +127,7 @@ public final class BtProfileConnectionInfo implements Parcelable {
    /**
     * @return The profile connection
     */
    public @BtProfile int getProfile() {
    public int getProfile() {
        return mProfile;
    }