Move serviceCounter outside template function
static variables inside template functions behave differently i.e.
each instantiation of function template has its own copy of
local static variables. This defeats the purpose of the counter
since the hal will exit even when there are connected services
in the hal-process.
Move the static variable declaration outside the template function
so that all instances of registerLazyPassthroughImplementation
share the same copy of serviceCounter.
Test: register multiple lazy services in the same hal process.
The hal-process should exit only when there are no connected services.
BUG: 130208323
Copyright (c) 2019 Qualcomm Innovation Center, Inc. All Rights Reserved.
Change-Id: Ie2d66a75e9aa376bcc298fcdcfa70b10da4732e8
1 file changed