From cb102fa3669944e4a250d6a8c9d122cc844b9fbf Mon Sep 17 00:00:00 2001 From: Arun Mirpuri Date: Fri, 11 Jan 2019 18:39:21 -0800 Subject: audio: Add API for BT to query offload A2DP encoding formats Add API in AudioManager to query offload A2DP encoding formats supported on primary HAL. This can be used instead of reading from property Bug: 111812273 Test: make Change-Id: I168f288d0bf32d6c9733c9b57934084667e794ee --- core/java/android/bluetooth/BluetoothCodecConfig.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/java/android/bluetooth/BluetoothCodecConfig.java') diff --git a/core/java/android/bluetooth/BluetoothCodecConfig.java b/core/java/android/bluetooth/BluetoothCodecConfig.java index 79c0a3a207c4..c9d0ef247ca5 100644 --- a/core/java/android/bluetooth/BluetoothCodecConfig.java +++ b/core/java/android/bluetooth/BluetoothCodecConfig.java @@ -114,6 +114,19 @@ public final class BluetoothCodecConfig implements Parcelable { mCodecSpecific4 = codecSpecific4; } + @UnsupportedAppUsage + public BluetoothCodecConfig(int codecType) { + mCodecType = codecType; + mCodecPriority = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT; + mSampleRate = BluetoothCodecConfig.SAMPLE_RATE_NONE; + mBitsPerSample = BluetoothCodecConfig.BITS_PER_SAMPLE_NONE; + mChannelMode = BluetoothCodecConfig.CHANNEL_MODE_NONE; + mCodecSpecific1 = 0; + mCodecSpecific2 = 0; + mCodecSpecific3 = 0; + mCodecSpecific4 = 0; + } + @Override public boolean equals(Object o) { if (o instanceof BluetoothCodecConfig) { -- cgit v1.2.3