diff options
author | Paul Keith <javelinanddart@gmail.com> | 2019-02-04 08:49:19 -0600 |
---|---|---|
committer | Paul Keith <javelinanddart@gmail.com> | 2019-02-04 09:28:10 -0600 |
commit | 75ac2f2facf7d04ccaa0a9d9f166a7e4d8ddbf2e (patch) | |
tree | 69b15859595503bdfa7a4f4ae1ef759c1f022de0 | |
parent | 7a5da242d4dfd8e6d849ac279cd2fc710fa66fc0 (diff) | |
download | android_hardware_lineage_livedisplay-75ac2f2facf7d04ccaa0a9d9f166a7e4d8ddbf2e.tar.gz android_hardware_lineage_livedisplay-75ac2f2facf7d04ccaa0a9d9f166a7e4d8ddbf2e.tar.bz2 android_hardware_lineage_livedisplay-75ac2f2facf7d04ccaa0a9d9f166a7e4d8ddbf2e.zip |
livedisplay: Use 1 thread
Change-Id: If06ce832d67197da313241920a71b358ab7654d1
-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(); |