Merge "Add BtProfileConnectionInfo.a2dpSinkInfo" am: 2d39eb02ca am: dc198a070d am: 744cd007db
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1933145 Change-Id: I651585b35f2cf307caf48a2ddb78adafdfc64405
This commit is contained in:
@@ -135,6 +135,7 @@ package android.media {
|
|||||||
|
|
||||||
public final class BtProfileConnectionInfo implements android.os.Parcelable {
|
public final class BtProfileConnectionInfo implements android.os.Parcelable {
|
||||||
method @NonNull public static android.media.BtProfileConnectionInfo a2dpInfo(boolean, int);
|
method @NonNull public static android.media.BtProfileConnectionInfo a2dpInfo(boolean, int);
|
||||||
|
method @NonNull public static android.media.BtProfileConnectionInfo a2dpSinkInfo(int);
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
method public boolean getIsLeOutput();
|
method public boolean getIsLeOutput();
|
||||||
method public int getProfile();
|
method public int getProfile();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public final class BtProfileConnectionInfo implements Parcelable {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
@IntDef({
|
@IntDef({
|
||||||
BluetoothProfile.A2DP,
|
BluetoothProfile.A2DP,
|
||||||
BluetoothProfile.A2DP_SINK, // Can only be set by BtHelper
|
BluetoothProfile.A2DP_SINK,
|
||||||
BluetoothProfile.HEADSET, // Can only be set by BtHelper
|
BluetoothProfile.HEADSET, // Can only be set by BtHelper
|
||||||
BluetoothProfile.HEARING_AID,
|
BluetoothProfile.HEARING_AID,
|
||||||
BluetoothProfile.LE_AUDIO,
|
BluetoothProfile.LE_AUDIO,
|
||||||
@@ -104,6 +104,16 @@ public final class BtProfileConnectionInfo implements Parcelable {
|
|||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for A2dp sink info
|
||||||
|
* The {@link AudioManager.ACTION_AUDIO_BECOMING_NOISY} intent will not be sent.
|
||||||
|
*
|
||||||
|
* @param volume of device -1 to ignore value
|
||||||
|
*/
|
||||||
|
public static @NonNull BtProfileConnectionInfo a2dpSinkInfo(int volume) {
|
||||||
|
return new BtProfileConnectionInfo(BluetoothProfile.A2DP_SINK, true, volume, false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for hearing aid info
|
* Constructor for hearing aid info
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user