Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1aedc5a authored by Shuzhen Wang's avatar Shuzhen Wang Committed by Peter Kalauskas
Browse files

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
Merged-In: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
parent 18697362
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -181,8 +181,10 @@ status_t CameraService::enumerateProviders() {

    for (auto& cameraId : deviceIds) {
        String8 id8 = String8(cameraId.c_str());
        if (getCameraState(id8) == nullptr) {
            onDeviceStatusChanged(id8, CameraDeviceStatus::PRESENT);
        }
    }

    return OK;
}