// Copyright (C) 2024 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 { default_applicable_licenses: ["Android-Apache-2.0"], } soong_config_module_type { name: "cf_apex", module_type: "apex", config_namespace: "cvd", bool_variables: [ "RELEASE_SM_OPEN_DECLARED_PASSTHROUGH_HAL", ], properties: [ "defaults", ], } cf_apex { name: "com.google.cf.gralloc", manifest: "apex_manifest.json", key: "com.google.cf.apex.key", certificate: ":com.google.cf.apex.certificate", file_contexts: "apex_file_contexts", updatable: false, vendor: true, binaries: [ "android.hardware.graphics.allocator-service.minigbm", ], prebuilts: [ "allocator.minigbm.xml", // vintf "com.google.cf.gralloc.rc", // init_rc ], overrides: [ "android.hardware.graphics.allocator-service.minigbm", ], soong_config_variables: { RELEASE_SM_OPEN_DECLARED_PASSTHROUGH_HAL: { defaults: [ "com.google.cf.gralloc-mapper-defaults", ], }, }, } apex_defaults { name: "com.google.cf.gralloc-mapper-defaults", // for app_process32 apps compile_multilib: "both", native_shared_libs: [ "mapper.minigbm", ], prebuilts: [ "com.google.cf.gralloc-linker-config", // make the apex namespace visible for mapper library "mapper.minigbm.xml", // vintf ], overrides: [ "mapper.minigbm", ], } linker_config { name: "com.google.cf.gralloc-linker-config", src: "apex_linkerconfig.json", installable: false, } genrule { name: "gen-com.google.cf.gralloc.rc", srcs: [":allocator.minigbm.rc"], out: ["com.google.cf.gralloc.rc"], cmd: "sed -E 's%/vendor/bin/%/apex/com.google.cf.gralloc/bin/%' $(in) > $(out)", } prebuilt_etc { name: "com.google.cf.gralloc.rc", src: ":gen-com.google.cf.gralloc.rc", installable: false, }