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

Commit 289b0395 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes Id85bf02d,If7985865 into main

* changes:
  Use Flag instead of string for api
  Revert^2 "Use aconfig flag for flaggedApi"
parents 450794b2 703da24a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -236,6 +236,7 @@ android_app {
    jni_uses_platform_apis: true,
    libs: [
        "app-compat-annotations",
        "bluetooth_flags_java_lib",
        "error_prone_annotations",
        "framework-annotations-lib",
        "framework-bluetooth-pre-jarjar",
@@ -262,7 +263,6 @@ android_app {
        "bluetooth-protos-lite",
        "bluetooth.change-ids",
        "bluetooth.mapsapi",
        "bluetooth_flags_java_lib",
        "com.android.obex",
        "com.android.vcard",
        "guava",
+3 −0
Original line number Diff line number Diff line
@@ -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",
}

+2 −0
Original line number Diff line number Diff line
@@ -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",
    ],
@@ -85,6 +86,7 @@ java_sdk_library {

    permitted_packages: [
        "android.bluetooth",
        "com.android.bluetooth.flags",
        // Created by jarjar rules.
        "com.android.bluetooth.x",
    ],
+2 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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();
+4 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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;
    }
@@ -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