package io.flutter.plugins.camera.features.fpsrange; import android.hardware.camera2.CaptureRequest; import android.os.Build; import android.util.Range; import io.flutter.plugins.camera.CameraProperties; import io.flutter.plugins.camera.features.CameraFeature; /* loaded from: classes6.dex */ public class FpsRangeFeature extends CameraFeature> { private static final Range MAX_PIXEL4A_RANGE = new Range<>(30, 30); private Range currentSetting; @Override // io.flutter.plugins.camera.features.CameraFeature public boolean checkIsSupported() { return true; } public FpsRangeFeature(CameraProperties cameraProperties) { super(cameraProperties); Range range; if (isPixel4A()) { this.currentSetting = MAX_PIXEL4A_RANGE; return; } Range[] controlAutoExposureAvailableTargetFpsRanges = cameraProperties.getControlAutoExposureAvailableTargetFpsRanges(); if (controlAutoExposureAvailableTargetFpsRanges != null) { for (Range range2 : controlAutoExposureAvailableTargetFpsRanges) { int intValue = range2.getUpper().intValue(); if (intValue >= 10 && ((range = this.currentSetting) == null || intValue > range.getUpper().intValue())) { this.currentSetting = range2; } } } } private boolean isPixel4A() { return Build.BRAND.equals("google") && Build.MODEL.equals("Pixel 4a"); } @Override // io.flutter.plugins.camera.features.CameraFeature public void updateBuilder(CaptureRequest.Builder builder) { if (checkIsSupported()) { builder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, this.currentSetting); } } @Override // io.flutter.plugins.camera.features.CameraFeature public void setValue(Range range) { this.currentSetting = range; } /* JADX WARN: Can't rename method to resolve collision */ @Override // io.flutter.plugins.camera.features.CameraFeature public Range getValue() { return this.currentSetting; } @Override // io.flutter.plugins.camera.features.CameraFeature public String getDebugName() { return "FpsRangeFeature"; } }