From 4d375a10b9d6d09843c02d660a745a2dcb2d08e6 Mon Sep 17 00:00:00 2001 From: Amos Bianchi Date: Fri, 2 Jul 2021 14:22:38 -0700 Subject: [PATCH] Add test service for HIDL active services callback. Bug: 191781736 Test: atest hidl_lazy_test Change-Id: Ie743d9d8635165f820977bfcb1548a83b56ccc1b --- tests/lazy_cb/1.0/.hidl_for_system_ext | 0 tests/lazy_cb/1.0/Android.bp | 23 +++++++++++++++++++++++ tests/lazy_cb/1.0/ILazyCb.hal | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 tests/lazy_cb/1.0/.hidl_for_system_ext create mode 100644 tests/lazy_cb/1.0/Android.bp create mode 100644 tests/lazy_cb/1.0/ILazyCb.hal diff --git a/tests/lazy_cb/1.0/.hidl_for_system_ext b/tests/lazy_cb/1.0/.hidl_for_system_ext new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/lazy_cb/1.0/Android.bp b/tests/lazy_cb/1.0/Android.bp new file mode 100644 index 0000000000..4d82b63155 --- /dev/null +++ b/tests/lazy_cb/1.0/Android.bp @@ -0,0 +1,23 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +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"], +} + +hidl_interface { + name: "android.hardware.tests.lazy_cb@1.0", + root: "android.hardware", + system_ext_specific: true, + srcs: [ + "ILazyCb.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + gen_java: true, +} diff --git a/tests/lazy_cb/1.0/ILazyCb.hal b/tests/lazy_cb/1.0/ILazyCb.hal new file mode 100644 index 0000000000..a9046b3353 --- /dev/null +++ b/tests/lazy_cb/1.0/ILazyCb.hal @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2021 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 android.hardware.tests.lazy_cb@1.0; + +interface ILazyCb { + /** + * Set the eventfd used to notify that the active services + * callback is being executed and is about to terminate the process. + */ + setEventFd(handle fds) generates (bool success); +};