diff options
-rw-r--r-- | legacymm/service.cpp | 16 | ||||
-rw-r--r-- | sdm/service.cpp | 19 |
2 files changed, 2 insertions, 33 deletions
diff --git a/legacymm/service.cpp b/legacymm/service.cpp index 46ccc17..dc37076 100644 --- a/legacymm/service.cpp +++ b/legacymm/service.cpp @@ -50,7 +50,6 @@ int main() { sp<ColorBalance> cb; sp<DisplayModes> dm; sp<PictureAdjustment> pa; - uint8_t services = 0; status_t status = OK; @@ -79,18 +78,12 @@ int main() { LOG(ERROR) << "Can not create an instance of LiveDisplay HAL ColorBalance Iface, exiting."; goto shutdown; } - if (cb->isSupported()) { - services++; - } dm = new DisplayModes(libHandle); if (dm == nullptr) { LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayModes Iface, exiting."; goto shutdown; } - if (dm->isSupported()) { - services++; - } pa = new PictureAdjustment(libHandle); if (pa == nullptr) { @@ -98,15 +91,8 @@ int main() { << "Can not create an instance of LiveDisplay HAL PictureAdjustment Iface, exiting."; goto shutdown; } - if (pa->isSupported()) { - services++; - } - - if (services == 0) { - goto shutdown; - } - configureRpcThreadpool(services, true /*callerWillJoin*/); + configureRpcThreadpool(1, true /*callerWillJoin*/); if (cb->isSupported()) { status = cb->registerAsService(); diff --git a/sdm/service.cpp b/sdm/service.cpp index 207121a..f561ad9 100644 --- a/sdm/service.cpp +++ b/sdm/service.cpp @@ -64,7 +64,6 @@ int main() { sp<ColorBalance> cb; sp<DisplayModes> dm; sp<PictureAdjustment> pa; - uint8_t services = 0; status_t status = OK; @@ -109,27 +108,18 @@ int main() { << "Can not create an instance of LiveDisplay HAL AdaptiveBacklight Iface, exiting."; goto shutdown; } - if (ab->isSupported()) { - services++; - } cb = new ColorBalance(libHandle, cookie); if (cb == nullptr) { LOG(ERROR) << "Can not create an instance of LiveDisplay HAL ColorBalance Iface, exiting."; goto shutdown; } - if (cb->isSupported()) { - services++; - } dm = new DisplayModes(libHandle, cookie); if (dm == nullptr) { LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayModes Iface, exiting."; goto shutdown; } - if (dm->isSupported()) { - services++; - } pa = new PictureAdjustment(libHandle, cookie); if (pa == nullptr) { @@ -137,15 +127,8 @@ int main() { << "Can not create an instance of LiveDisplay HAL PictureAdjustment Iface, exiting."; goto shutdown; } - if (pa->isSupported()) { - services++; - } - - if (services == 0) { - goto shutdown; - } - configureRpcThreadpool(services, true /*callerWillJoin*/); + configureRpcThreadpool(1, true /*callerWillJoin*/); if (ab->isSupported()) { status = ab->registerAsService(); |