Loading flags/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -17,12 +17,15 @@ java_aconfig_library { visibility: [ "//cts/tests/tests/bluetooth:__subpackages__", "//packages/modules/Bluetooth/android/app", "//packages/modules/Bluetooth/framework", "//packages/modules/Bluetooth/framework/tests/util", "//packages/modules/Bluetooth/service:__subpackages__", ], apex_available: [ "com.android.btservices", ], libs: ["framework-configinfrastructure"], sdk_version: "module_current", min_sdk_version: "Tiramisu", } Loading framework/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ java_defaults { defaults: ["bluetooth-module-sdk-version-defaults"], static_libs: [ "PlatformProperties", "bluetooth_flags_java_lib", "modules-utils-expresslog", "modules-utils-synchronous-result-receiver", ], Loading Loading @@ -85,6 +86,7 @@ java_sdk_library { permitted_packages: [ "android.bluetooth", "com.android.bluetooth.flags", // Created by jarjar rules. "com.android.bluetooth.x", ], Loading framework/java/android/bluetooth/BluetoothA2dp.java +2 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.os.ParcelUuid; import android.os.RemoteException; import android.util.Log; import com.android.bluetooth.flags.Flags; import com.android.modules.utils.SynchronousResultReceiver; import java.lang.annotation.Retention; Loading Loading @@ -742,7 +743,7 @@ public final class BluetoothA2dp implements BluetoothProfile { @NonNull @RequiresLegacyBluetoothPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public List<BluetoothCodecType> getSupportedCodecTypes() { Log.d(TAG, "getSupportedSourceCodecTypes()"); final IBluetoothA2dp service = getService(); Loading framework/java/android/bluetooth/BluetoothCodecConfig.java +4 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; import com.android.bluetooth.flags.Flags; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Objects; Loading Loading @@ -547,7 +549,7 @@ public final class BluetoothCodecConfig implements Parcelable { } /** Returns the source codec type of this config. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @Nullable BluetoothCodecType getExtendedCodecType() { return mCodecType; } Loading Loading @@ -857,7 +859,7 @@ public final class BluetoothCodecConfig implements Parcelable { * @param codecType of this codec * @return the same Builder instance */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @NonNull Builder setCodecType(@Nullable BluetoothCodecType codecType) { mCodecType = codecType; return this; Loading framework/java/android/bluetooth/BluetoothCodecType.java +10 −8 Original line number Diff line number Diff line Loading @@ -23,12 +23,14 @@ import android.annotation.SystemApi; import android.os.Parcel; import android.os.Parcelable; import com.android.bluetooth.flags.Flags; /** * Represents a supported source codec type for a Bluetooth A2DP device. See {@link * BluetoothA2dp#getSupportedCodecTypes}. The codec type is uniquely identified by its name and * codec identifier. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public final class BluetoothCodecType implements Parcelable { private final int mNativeCodecType; private final long mCodecId; Loading Loading @@ -86,7 +88,7 @@ public final class BluetoothCodecType implements Parcelable { } /** Returns if the codec type is mandatory in the Bluetooth specification. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public boolean isMandatoryCodec() { return mNativeCodecType == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC; } Loading @@ -97,13 +99,13 @@ public final class BluetoothCodecType implements Parcelable { * 0, if octet 0 is not 0xFF. - Bits 24-39: Vendor-defined codec ID, set to 0, if octet 0 is not * 0xFF. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public long getCodecId() { return mCodecId; } /** Returns the codec name. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @NonNull String getCodecName() { return mCodecName; } Loading Loading @@ -144,7 +146,7 @@ public final class BluetoothCodecType implements Parcelable { /** @hide */ @Override @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeInt(mNativeCodecType); dest.writeLong(mCodecId); Loading @@ -159,7 +161,7 @@ public final class BluetoothCodecType implements Parcelable { * @hide */ @SystemApi @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public static @Nullable BluetoothCodecType createFromType( @BluetoothCodecConfig.SourceCodecType int codecType) { long codecId = Loading @@ -185,12 +187,12 @@ public final class BluetoothCodecType implements Parcelable { * @hide */ @Override @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public int describeContents() { return 0; } @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public static final @NonNull Creator<BluetoothCodecType> CREATOR = new Creator<>() { public BluetoothCodecType createFromParcel(Parcel in) { Loading Loading
flags/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -17,12 +17,15 @@ java_aconfig_library { visibility: [ "//cts/tests/tests/bluetooth:__subpackages__", "//packages/modules/Bluetooth/android/app", "//packages/modules/Bluetooth/framework", "//packages/modules/Bluetooth/framework/tests/util", "//packages/modules/Bluetooth/service:__subpackages__", ], apex_available: [ "com.android.btservices", ], libs: ["framework-configinfrastructure"], sdk_version: "module_current", min_sdk_version: "Tiramisu", } Loading
framework/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ java_defaults { defaults: ["bluetooth-module-sdk-version-defaults"], static_libs: [ "PlatformProperties", "bluetooth_flags_java_lib", "modules-utils-expresslog", "modules-utils-synchronous-result-receiver", ], Loading Loading @@ -85,6 +86,7 @@ java_sdk_library { permitted_packages: [ "android.bluetooth", "com.android.bluetooth.flags", // Created by jarjar rules. "com.android.bluetooth.x", ], Loading
framework/java/android/bluetooth/BluetoothA2dp.java +2 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.os.ParcelUuid; import android.os.RemoteException; import android.util.Log; import com.android.bluetooth.flags.Flags; import com.android.modules.utils.SynchronousResultReceiver; import java.lang.annotation.Retention; Loading Loading @@ -742,7 +743,7 @@ public final class BluetoothA2dp implements BluetoothProfile { @NonNull @RequiresLegacyBluetoothPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public List<BluetoothCodecType> getSupportedCodecTypes() { Log.d(TAG, "getSupportedSourceCodecTypes()"); final IBluetoothA2dp service = getService(); Loading
framework/java/android/bluetooth/BluetoothCodecConfig.java +4 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; import com.android.bluetooth.flags.Flags; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Objects; Loading Loading @@ -547,7 +549,7 @@ public final class BluetoothCodecConfig implements Parcelable { } /** Returns the source codec type of this config. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @Nullable BluetoothCodecType getExtendedCodecType() { return mCodecType; } Loading Loading @@ -857,7 +859,7 @@ public final class BluetoothCodecConfig implements Parcelable { * @param codecType of this codec * @return the same Builder instance */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @NonNull Builder setCodecType(@Nullable BluetoothCodecType codecType) { mCodecType = codecType; return this; Loading
framework/java/android/bluetooth/BluetoothCodecType.java +10 −8 Original line number Diff line number Diff line Loading @@ -23,12 +23,14 @@ import android.annotation.SystemApi; import android.os.Parcel; import android.os.Parcelable; import com.android.bluetooth.flags.Flags; /** * Represents a supported source codec type for a Bluetooth A2DP device. See {@link * BluetoothA2dp#getSupportedCodecTypes}. The codec type is uniquely identified by its name and * codec identifier. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public final class BluetoothCodecType implements Parcelable { private final int mNativeCodecType; private final long mCodecId; Loading Loading @@ -86,7 +88,7 @@ public final class BluetoothCodecType implements Parcelable { } /** Returns if the codec type is mandatory in the Bluetooth specification. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public boolean isMandatoryCodec() { return mNativeCodecType == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC; } Loading @@ -97,13 +99,13 @@ public final class BluetoothCodecType implements Parcelable { * 0, if octet 0 is not 0xFF. - Bits 24-39: Vendor-defined codec ID, set to 0, if octet 0 is not * 0xFF. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public long getCodecId() { return mCodecId; } /** Returns the codec name. */ @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public @NonNull String getCodecName() { return mCodecName; } Loading Loading @@ -144,7 +146,7 @@ public final class BluetoothCodecType implements Parcelable { /** @hide */ @Override @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeInt(mNativeCodecType); dest.writeLong(mCodecId); Loading @@ -159,7 +161,7 @@ public final class BluetoothCodecType implements Parcelable { * @hide */ @SystemApi @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public static @Nullable BluetoothCodecType createFromType( @BluetoothCodecConfig.SourceCodecType int codecType) { long codecId = Loading @@ -185,12 +187,12 @@ public final class BluetoothCodecType implements Parcelable { * @hide */ @Override @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public int describeContents() { return 0; } @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility") @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY) public static final @NonNull Creator<BluetoothCodecType> CREATOR = new Creator<>() { public BluetoothCodecType createFromParcel(Parcel in) { Loading