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

Commit 9a4b6b9c authored by Tang Lee's avatar Tang Lee
Browse files

Revert "Use aconfig flag for flaggedApi"

This reverts commit c2ac4c49.

Reason for revert: b/321154514 CtsStrictJavaPackagesTestCases test fail on aosp_cf_x86_64_phone-trunk_staging-userdebug target on aosp-main branch
Bug: 321154514
Change-Id: Ia70b82461c37433ebc096760150ad9b846dd2b7b
parent c2ac4c49
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -17,15 +17,12 @@ 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",
}

+0 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ java_defaults {
    defaults: ["bluetooth-module-sdk-version-defaults"],
    static_libs: [
        "PlatformProperties",
        "bluetooth_flags_java_lib",
        "modules-utils-expresslog",
        "modules-utils-synchronous-result-receiver",
    ],
@@ -86,7 +85,6 @@ java_sdk_library {

    permitted_packages: [
        "android.bluetooth",
        "com.android.bluetooth.flags",
        // Created by jarjar rules.
        "com.android.bluetooth.x",
    ],
+1 −2
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ 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;
@@ -743,7 +742,7 @@ public final class BluetoothA2dp implements BluetoothProfile {
    @NonNull
    @RequiresLegacyBluetoothPermission
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public List<BluetoothCodecType> getSupportedCodecTypes() {
        Log.d(TAG, "getSupportedSourceCodecTypes()");
        final IBluetoothA2dp service = getService();
+2 −4
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ 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;
@@ -549,7 +547,7 @@ public final class BluetoothCodecConfig implements Parcelable {
    }

    /** Returns the source codec type of this config. */
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public @Nullable BluetoothCodecType getExtendedCodecType() {
        return mCodecType;
    }
@@ -859,7 +857,7 @@ public final class BluetoothCodecConfig implements Parcelable {
         * @param codecType of this codec
         * @return the same Builder instance
         */
        @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
        @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
        public @NonNull Builder setCodecType(@Nullable BluetoothCodecType codecType) {
            mCodecType = codecType;
            return this;
+8 −10
Original line number Diff line number Diff line
@@ -23,14 +23,12 @@ 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(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
@FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
public final class BluetoothCodecType implements Parcelable {
    private final int mNativeCodecType;
    private final long mCodecId;
@@ -88,7 +86,7 @@ public final class BluetoothCodecType implements Parcelable {
    }

    /** Returns if the codec type is mandatory in the Bluetooth specification. */
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public boolean isMandatoryCodec() {
        return mNativeCodecType == BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC;
    }
@@ -99,13 +97,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(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public long getCodecId() {
        return mCodecId;
    }

    /** Returns the codec name. */
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public @NonNull String getCodecName() {
        return mCodecName;
    }
@@ -146,7 +144,7 @@ public final class BluetoothCodecType implements Parcelable {

    /** @hide */
    @Override
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeInt(mNativeCodecType);
        dest.writeLong(mCodecId);
@@ -161,7 +159,7 @@ public final class BluetoothCodecType implements Parcelable {
     * @hide
     */
    @SystemApi
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public static @Nullable BluetoothCodecType createFromType(
            @BluetoothCodecConfig.SourceCodecType int codecType) {
        long codecId =
@@ -187,12 +185,12 @@ public final class BluetoothCodecType implements Parcelable {
     * @hide
     */
    @Override
    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public int describeContents() {
        return 0;
    }

    @FlaggedApi(Flags.FLAG_A2DP_OFFLOAD_CODEC_EXTENSIBILITY)
    @FlaggedApi("com.android.bluetooth.flags.a2dp_offload_codec_extensibility")
    public static final @NonNull Creator<BluetoothCodecType> CREATOR =
            new Creator<>() {
                public BluetoothCodecType createFromParcel(Parcel in) {
Loading