package {
    default_team: "trendy_team_android_media_audio_framework",
    // 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.soundtrigger3",
    vendor_available: true,
    host_supported: true,
    flags: [
        "-Werror",
        "-Weverything",
        "-Wno-missing-permission-annotation",
    ],
    srcs: [
        "android/hardware/soundtrigger3/ISoundTriggerHw.aidl",
        "android/hardware/soundtrigger3/ISoundTriggerHwCallback.aidl",
        "android/hardware/soundtrigger3/ISoundTriggerHwGlobalCallback.aidl",
    ],
    stability: "vintf",
    defaults: [
        "latest_android_media_soundtrigger_types_import_interface",
    ],
    backend: {
        cpp: {
            // prefer NDK backend which can be used anywhere
            enabled: false,
        },
        java: {
            sdk_version: "module_current",
        },
    },
    frozen: true,
    versions_with_info: [
        {
            version: "1",
            imports: ["android.media.soundtrigger.types-V1"],
        },
        {
            version: "2",
            imports: ["android.media.soundtrigger.types-V2"],
        },

        // IMPORTANT: Update latest_android_hardware_soundtrigger3 every time
        // you add the latest frozen version to versions_with_info
    ],
}

// Note: This should always be one version ahead of the last frozen version
latest_android_hardware_soundtrigger3 = "android.hardware.soundtrigger3-V2"

// Modules that depend on android.hardware.soundtrigger3 directly can include
// the following java_defaults to avoid explicitly managing dependency versions
// across many scattered files.
java_defaults {
    name: "latest_android_hardware_soundtrigger3_java_static",
    static_libs: [
        latest_android_hardware_soundtrigger3 + "-java",
    ],
}

cc_defaults {
    name: "latest_android_hardware_soundtrigger3_ndk_shared",
    shared_libs: [
        latest_android_hardware_soundtrigger3 + "-ndk",
    ],
}
