From 5a58e9bf9b19faf9550d1622f440930b8f914a78 Mon Sep 17 00:00:00 2001 From: Amos Bianchi Date: Wed, 30 Dec 2020 10:48:30 -0800 Subject: [PATCH] Add method for testing lazy HALs active services count callback. Bug: 176240491 Test: atest hidl_lazy_test Change-Id: I2db4fa62fac725fc4943678e0d8aa89c9f411350 --- tests/lazy/1.1/ILazy.hal | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/lazy/1.1/ILazy.hal b/tests/lazy/1.1/ILazy.hal index a15e0e3641..b0a6a2aa09 100644 --- a/tests/lazy/1.1/ILazy.hal +++ b/tests/lazy/1.1/ILazy.hal @@ -18,4 +18,12 @@ package android.hardware.tests.lazy@1.1; import android.hardware.tests.lazy@1.0; -interface ILazy extends @1.0::ILazy {}; +interface ILazy extends @1.0::ILazy { + /** + * Ask the process hosting the service to install a callback that notifies + * it when the number of active (i.e. with clients) services changes. + * For testing purposes, this callback exercises the code to unregister/re-register + * the services and eventually shuts down the process. + */ + setCustomActiveServicesCountCallback(); +};