release the camera after strobe only if there wont be a perm torch after

This commit is contained in:
tibbi 2016-09-25 15:46:50 +02:00
parent 37ec102452
commit a561416195

View File

@ -221,9 +221,11 @@ public class MyCameraImpl {
if (mCamera != null) { if (mCamera != null) {
mCamera.setParameters(torchOff); mCamera.setParameters(torchOff);
if (!mShouldEnableFlashlight) {
mCamera.release(); mCamera.release();
mCamera = null; mCamera = null;
} }
}
mIsStroboscopeRunning = false; mIsStroboscopeRunning = false;
mShouldStroboscopeStop = false; mShouldStroboscopeStop = false;