|
|
@ -54,13 +54,15 @@ int main() { |
|
|
|
|
|
|
|
|
|
|
|
adaptiveBacklight = new AdaptiveBacklight(); |
|
|
|
adaptiveBacklight = new AdaptiveBacklight(); |
|
|
|
if (adaptiveBacklight == nullptr) { |
|
|
|
if (adaptiveBacklight == nullptr) { |
|
|
|
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL AdaptiveBacklight Iface, exiting."; |
|
|
|
LOG(ERROR) |
|
|
|
|
|
|
|
<< "Can not create an instance of LiveDisplay HAL AdaptiveBacklight Iface, exiting."; |
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
displayColorCalibrationExynos = new DisplayColorCalibrationExynos(); |
|
|
|
displayColorCalibrationExynos = new DisplayColorCalibrationExynos(); |
|
|
|
if (displayColorCalibrationExynos == nullptr) { |
|
|
|
if (displayColorCalibrationExynos == nullptr) { |
|
|
|
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayColorCalibration Iface, exiting."; |
|
|
|
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayColorCalibration " |
|
|
|
|
|
|
|
"Iface, exiting."; |
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -72,13 +74,15 @@ int main() { |
|
|
|
|
|
|
|
|
|
|
|
readingEnhancement = new ReadingEnhancement(); |
|
|
|
readingEnhancement = new ReadingEnhancement(); |
|
|
|
if (readingEnhancement == nullptr) { |
|
|
|
if (readingEnhancement == nullptr) { |
|
|
|
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL ReadingEnhancement Iface, exiting."; |
|
|
|
LOG(ERROR) |
|
|
|
|
|
|
|
<< "Can not create an instance of LiveDisplay HAL ReadingEnhancement Iface, exiting."; |
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sunlightEnhancementExynos = new SunlightEnhancementExynos(); |
|
|
|
sunlightEnhancementExynos = new SunlightEnhancementExynos(); |
|
|
|
if (sunlightEnhancementExynos == nullptr) { |
|
|
|
if (sunlightEnhancementExynos == nullptr) { |
|
|
|
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL SunlightEnhancement Iface, exiting."; |
|
|
|
LOG(ERROR) |
|
|
|
|
|
|
|
<< "Can not create an instance of LiveDisplay HAL SunlightEnhancement Iface, exiting."; |
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -87,9 +91,8 @@ int main() { |
|
|
|
if (adaptiveBacklight->isSupported()) { |
|
|
|
if (adaptiveBacklight->isSupported()) { |
|
|
|
status = adaptiveBacklight->registerAsService(); |
|
|
|
status = adaptiveBacklight->registerAsService(); |
|
|
|
if (status != OK) { |
|
|
|
if (status != OK) { |
|
|
|
LOG(ERROR) |
|
|
|
LOG(ERROR) << "Could not register service for LiveDisplay HAL AdaptiveBacklight Iface (" |
|
|
|
<< "Could not register service for LiveDisplay HAL AdaptiveBacklight Iface (" |
|
|
|
<< status << ")"; |
|
|
|
<< status << ")"; |
|
|
|
|
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -107,9 +110,8 @@ int main() { |
|
|
|
if (displayModes->isSupported()) { |
|
|
|
if (displayModes->isSupported()) { |
|
|
|
status = displayModes->registerAsService(); |
|
|
|
status = displayModes->registerAsService(); |
|
|
|
if (status != OK) { |
|
|
|
if (status != OK) { |
|
|
|
LOG(ERROR) |
|
|
|
LOG(ERROR) << "Could not register service for LiveDisplay HAL DisplayModes Iface (" |
|
|
|
<< "Could not register service for LiveDisplay HAL DisplayModes Iface (" |
|
|
|
<< status << ")"; |
|
|
|
<< status << ")"; |
|
|
|
|
|
|
|
goto shutdown; |
|
|
|
goto shutdown; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -136,7 +138,7 @@ int main() { |
|
|
|
|
|
|
|
|
|
|
|
LOG(INFO) << "LiveDisplay HAL service is ready."; |
|
|
|
LOG(INFO) << "LiveDisplay HAL service is ready."; |
|
|
|
joinRpcThreadpool(); |
|
|
|
joinRpcThreadpool(); |
|
|
|
// Should not pass this line
|
|
|
|
// Should not pass this line
|
|
|
|
|
|
|
|
|
|
|
|
shutdown: |
|
|
|
shutdown: |
|
|
|
// In normal operation, we don't expect the thread pool to shutdown
|
|
|
|
// In normal operation, we don't expect the thread pool to shutdown
|
|
|
|