// This is the expected build file, but it may not be right in all cases

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "hardware_interfaces_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["hardware_interfaces_license"],
}

aidl_interface {
    name: "android.hardware.automotive.audiocontrol",
    vendor_available: true,
    srcs: ["android/hardware/automotive/audiocontrol/*.aidl"],
    defaults: [
        "latest_android_hardware_audio_common_import_interface",
        "latest_android_media_audio_common_types_import_interface",
    ],
    stability: "vintf",
    backend: {
        java: {
            sdk_version: "module_current",
            min_sdk_version: "31",
            apex_available: [
                "//apex_available:platform",
                "com.android.car.framework",
            ],
        },
        rust: {
            enabled: true,
        },
    },
    versions_with_info: [
        {
            version: "1",
            imports: [
                "android.hardware.audio.common-V1",
                "android.media.audio.common.types-V2",
            ],
        },
        {
            version: "2",
            imports: [
                "android.hardware.audio.common-V1",
                "android.media.audio.common.types-V2",
            ],
        },
        {
            version: "3",
            imports: [
                "android.hardware.audio.common-V1",
                "android.media.audio.common.types-V2",
            ],
        },
        {
            version: "4",
            imports: [
                "android.media.audio.common.types-V3",
                "android.hardware.audio.common-V3",
            ],
        },

    ],
    frozen: true,

}

// Note: This should always be one version ahead of the last frozen version
latest_android_hardware_automotive_audiocontrol = "android.hardware.automotive.audiocontrol-V4"

cc_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_cpp_static",
    static_libs: [
        latest_android_hardware_automotive_audiocontrol + "-cpp",
    ],
}

cc_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_cpp_shared",
    shared_libs: [
        latest_android_hardware_automotive_audiocontrol + "-cpp",
    ],
}

cc_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_ndk_static",
    static_libs: [
        latest_android_hardware_automotive_audiocontrol + "-ndk",
    ],
}

cc_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_ndk_shared",
    shared_libs: [
        latest_android_hardware_automotive_audiocontrol + "-ndk",
    ],
}

java_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_java_static",
    static_libs: [
        latest_android_hardware_automotive_audiocontrol + "-java",
    ],
}

rust_defaults {
    name: "latest_android_hardware_automotive_audiocontrol_rust",
    rustlibs: [
        latest_android_hardware_automotive_audiocontrol + "-rust",
    ],
}