Skip to content

Commit

Permalink
Revert "Fix high battery drain after using flashlight After turning o…
Browse files Browse the repository at this point in the history
…ff the flashlight via the tile, the camera is kept open, preventing the device from entering deep sleep (and destroying battery life)."

This reverts commit 31e163657471e829a1f227ca69dd01b06ebeaaae.

Assigning NULL to sp will eventually execute its destructor.

Signed-off-by: xNombre <[email protected]>
  • Loading branch information
xNombre authored and iqbal committed Nov 12, 2021
1 parent fb7423a commit b7d4048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/camera/libcameraservice/CameraFlashlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ status_t CameraHardwareInterfaceFlashControl::disconnectCameraDevice() {
}
mDevice->setPreviewWindow(NULL);
mDevice->release();
mDevice.clear();
mDevice = NULL;

return OK;
}
Expand Down

0 comments on commit b7d4048

Please sign in to comment.