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,8 +221,10 @@ public class MyCameraImpl {
if (mCamera != null) { if (mCamera != null) {
mCamera.setParameters(torchOff); mCamera.setParameters(torchOff);
mCamera.release(); if (!mShouldEnableFlashlight) {
mCamera = null; mCamera.release();
mCamera = null;
}
} }
mIsStroboscopeRunning = false; mIsStroboscopeRunning = false;
mShouldStroboscopeStop = false; mShouldStroboscopeStop = false;