// Copyright 2020, The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

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

aidl_interface {
    name: "android.security.authorization",
    srcs: ["android/security/authorization/*.aidl"],
    defaults: ["android.hardware.security.keymint-latest-defaults"],
    imports: [
        "android.hardware.security.secureclock-V1",
    ],
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
            apps_enabled: false,
        },
    },
}

aidl_interface {
    name: "android.security.apc",
    srcs: ["android/security/apc/*.aidl"],
    unstable: true,
    backend: {
        java: {
            enabled: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
        },
    },
}

aidl_interface {
    name: "android.security.compat",
    srcs: ["android/security/compat/*.aidl"],
    defaults: ["android.hardware.security.keymint-latest-defaults"],
    imports: [
        "android.hardware.security.secureclock-V1",
        "android.hardware.security.sharedsecret-V1",
    ],
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
            apps_enabled: false,
        },
    },
}

aidl_interface {
    name: "android.security.maintenance",
    srcs: ["android/security/maintenance/*.aidl"],
    defaults: [
        "android.system.keystore2-latest-defaults",
    ],
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
            apps_enabled: false,
        },
    },
}

aidl_interface {
    name: "android.security.legacykeystore",
    srcs: ["android/security/legacykeystore/*.aidl"],
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
            apps_enabled: false,
        },
    },
}

aidl_interface {
    name: "android.security.postprocessor",
    srcs: ["android/security/postprocessor/*.aidl"],
    unstable: true,
    backend: {
        java: {
            enabled: false,
        },
        cpp: {
            enabled: false,
        },
        ndk: {
            enabled: false,
        },
        rust: {
            enabled: true,
        },
    },
}

aidl_interface {
    name: "android.security.metrics",
    srcs: ["android/security/metrics/*.aidl"],
    defaults: [
        "android.system.keystore2-latest-defaults",
    ],
    unstable: true,
    backend: {
        java: {
            platform_apis: true,
        },
        rust: {
            enabled: true,
        },
        ndk: {
            enabled: true,
            apps_enabled: false,
        },
    },
}
