mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-18 12:20:36 +01:00
have flash on permanently even in photo mode, if set so
This commit is contained in:
parent
3931579d48
commit
93ec82df00
@ -221,12 +221,6 @@ public class Preview extends ViewGroup
|
|||||||
|
|
||||||
public void takePicture() {
|
public void takePicture() {
|
||||||
if (mCanTakePicture) {
|
if (mCanTakePicture) {
|
||||||
if (mIsFlashEnabled) {
|
|
||||||
mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
|
|
||||||
} else {
|
|
||||||
mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
int rotation = Utils.Companion.getMediaRotation(mActivity, mCurrCameraId);
|
int rotation = Utils.Companion.getMediaRotation(mActivity, mCurrCameraId);
|
||||||
rotation += Utils.Companion.compensateDeviceRotation(mCurrCameraId, mCallback.getCurrentOrientation());
|
rotation += Utils.Companion.compensateDeviceRotation(mCurrCameraId, mCallback.getCurrentOrientation());
|
||||||
|
|
||||||
@ -278,11 +272,6 @@ public class Preview extends ViewGroup
|
|||||||
}
|
}
|
||||||
|
|
||||||
mCanTakePicture = true;
|
mCanTakePicture = true;
|
||||||
|
|
||||||
if (mIsFlashEnabled) {
|
|
||||||
mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
|
|
||||||
mCamera.setParameters(mParameters);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Camera.Size getOptimalPictureSize() {
|
private Camera.Size getOptimalPictureSize() {
|
||||||
@ -532,11 +521,8 @@ public class Preview extends ViewGroup
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void enableFlash() {
|
public void enableFlash() {
|
||||||
if (mIsVideoMode) {
|
mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
|
||||||
mParameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
|
mCamera.setParameters(mParameters);
|
||||||
mCamera.setParameters(mParameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
mIsFlashEnabled = true;
|
mIsFlashEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user