alexandroid/decompiled/jadx/sources/androidx/camera/camera2/internal/ExposureStateImpl.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

57 lines
2.1 KiB
Java

package androidx.camera.camera2.internal;
import android.hardware.camera2.CameraCharacteristics;
import android.util.Range;
import android.util.Rational;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.camera.camera2.internal.compat.CameraCharacteristicsCompat;
import androidx.camera.core.ExposureState;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes.dex */
class ExposureStateImpl implements ExposureState {
private final CameraCharacteristicsCompat mCameraCharacteristics;
@GuardedBy("mLock")
private int mExposureCompensation;
private final Object mLock = new Object();
public ExposureStateImpl(CameraCharacteristicsCompat cameraCharacteristicsCompat, int i) {
this.mCameraCharacteristics = cameraCharacteristicsCompat;
this.mExposureCompensation = i;
}
@Override // androidx.camera.core.ExposureState
public int getExposureCompensationIndex() {
int i;
synchronized (this.mLock) {
i = this.mExposureCompensation;
}
return i;
}
@Override // androidx.camera.core.ExposureState
@NonNull
public Range<Integer> getExposureCompensationRange() {
return (Range) this.mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE);
}
@Override // androidx.camera.core.ExposureState
@NonNull
public Rational getExposureCompensationStep() {
return !isExposureCompensationSupported() ? Rational.ZERO : (Rational) this.mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_STEP);
}
@Override // androidx.camera.core.ExposureState
public boolean isExposureCompensationSupported() {
Range range = (Range) this.mCameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE);
return (range == null || ((Integer) range.getLower()).intValue() == 0 || ((Integer) range.getUpper()).intValue() == 0) ? false : true;
}
public void setExposureCompensationIndex(int i) {
synchronized (this.mLock) {
this.mExposureCompensation = i;
}
}
}