Camera: Do not update state at HAL starts up if state already exists

This is to handle lazy hal, where cameraserver doesn't know HAL goes
away.

Test: Observe that the between QS Torch Tile and Camera App is correct.
Bug: 79374634
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
gugelfrei
Shuzhen Wang 6 years ago
parent c40d87ea84
commit 6ba3f5e527

@ -190,7 +190,9 @@ status_t CameraService::enumerateProviders() {
for (auto& cameraId : deviceIds) {
String8 id8 = String8(cameraId.c_str());
onDeviceStatusChanged(id8, CameraDeviceStatus::PRESENT);
if (getCameraState(id8) == nullptr) {
onDeviceStatusChanged(id8, CameraDeviceStatus::PRESENT);
}
}
return OK;

Loading…
Cancel
Save