what-the-bank/sources/io/flutter/plugins/camera/features/exposureoffset/ExposureOffsetFeature.java

56 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package io.flutter.plugins.camera.features.exposureoffset;
import android.hardware.camera2.CaptureRequest;
import io.flutter.plugins.camera.CameraProperties;
import io.flutter.plugins.camera.features.CameraFeature;
/* loaded from: classes6.dex */
public class ExposureOffsetFeature extends CameraFeature<Double> {
private double currentSetting;
@Override // io.flutter.plugins.camera.features.CameraFeature
public boolean checkIsSupported() {
return true;
}
public ExposureOffsetFeature(CameraProperties cameraProperties) {
super(cameraProperties);
this.currentSetting = 0.0d;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // io.flutter.plugins.camera.features.CameraFeature
public Double getValue() {
return Double.valueOf(this.currentSetting);
}
@Override // io.flutter.plugins.camera.features.CameraFeature
public void setValue(Double d) {
this.currentSetting = d.doubleValue() / getExposureOffsetStepSize();
}
@Override // io.flutter.plugins.camera.features.CameraFeature
public void updateBuilder(CaptureRequest.Builder builder) {
if (checkIsSupported()) {
builder.set(CaptureRequest.CONTROL_AE_EXPOSURE_COMPENSATION, Integer.valueOf((int) this.currentSetting));
}
}
public double getMinExposureOffset() {
return (this.cameraProperties.getControlAutoExposureCompensationRange() == null ? 0.0d : r0.getLower().intValue()) * getExposureOffsetStepSize();
}
public double getMaxExposureOffset() {
return (this.cameraProperties.getControlAutoExposureCompensationRange() == null ? 0.0d : r0.getUpper().intValue()) * getExposureOffsetStepSize();
}
public double getExposureOffsetStepSize() {
return this.cameraProperties.getControlAutoExposureCompensationStep();
}
@Override // io.flutter.plugins.camera.features.CameraFeature
public String getDebugName() {
return "ExposureOffsetFeature";
}
}