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

Commit c5cb1030 authored by Mark Harman's avatar Mark Harman
Browse files

Show toast to hold steady for low light mode; also fix photo image save queue length.

parent e9c80843
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ public abstract class CameraController {
	public static final String ISO_DEFAULT = "auto";
	public static final long EXPOSURE_TIME_DEFAULT = 1000000000L/30; // note, responsibility of callers to check that this is within the valid min/max range

	public static final int N_IMAGES_NR_DARK = 8;
	public static final int N_IMAGES_NR_DARK_LOW_LIGHT = 15;

	// for testing:
	int count_camera_parameters_exception;
	public int count_precapture_timeout;
+1 −1
Original line number Diff line number Diff line
@@ -5523,7 +5523,7 @@ public class CameraController2 extends CameraController {
					if( capture_result_iso >= 1100 ) {
						if( MyDebug.LOG )
							Log.d(TAG, "optimise for dark scene");
						n_burst = noise_reduction_low_light ? 15 : 8;
						n_burst = noise_reduction_low_light ? N_IMAGES_NR_DARK_LOW_LIGHT : N_IMAGES_NR_DARK;
						boolean is_oneplus = Build.MANUFACTURER.toLowerCase(Locale.US).contains("oneplus");
						// OnePlus 3T at least has bug where manual ISO can't be set to above 800, so dark images end up too dark -
						// so no point enabling this code, which is meant to brighten the scene, not make it darker!
+6 −1
Original line number Diff line number Diff line
@@ -1002,7 +1002,12 @@ public class MyApplicationInterface extends BasicApplicationInterface {
			else if( main_activity.getPreview().supportsBurst() && this.isCameraBurstPref() ) {
				n_raw = 0;
				if( this.getBurstForNoiseReduction() ) {
					n_jpegs = 8;
					if( this.getNRModePref() == ApplicationInterface.NRModePref.NRMODE_LOW_LIGHT ) {
						n_jpegs = CameraController.N_IMAGES_NR_DARK_LOW_LIGHT;
					}
					else {
						n_jpegs = CameraController.N_IMAGES_NR_DARK;
					}
				}
				else {
					n_jpegs = this.getBurstNImages();
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public interface ApplicationInterface {
		NRMODE_NORMAL,
		NRMODE_LOW_LIGHT
	}
	NRModePref getNRModePref();
	NRModePref getNRModePref(); // only relevant if getBurstForNoiseReduction() returns true
	boolean getOptimiseAEForDROPref(); // see CameraController doc for setOptimiseAEForDRO().
	enum RawPref {
		RAWPREF_JPEG_ONLY, // JPEG only
+5 −0
Original line number Diff line number Diff line
@@ -5627,6 +5627,11 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
				if( MyDebug.LOG )
					Log.d(TAG, "onStarted");
				applicationInterface.onCaptureStarted();
				if( applicationInterface.getBurstForNoiseReduction() && applicationInterface.getNRModePref() == ApplicationInterface.NRModePref.NRMODE_LOW_LIGHT ) {
					if( camera_controller.getBurstTotal() >= CameraController.N_IMAGES_NR_DARK_LOW_LIGHT ) {
						showToast(null, R.string.preference_nr_mode_low_light_message);
					}
				}
			}

			public void onCompleted() {
Loading