mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Issue #38 : extra defensive -- don't even assume the list is sorted in case of buggy phones
This commit is contained in:
parent
e174140d8d
commit
a8c9897da3
|
@ -239,9 +239,11 @@ final class CameraConfigurationManager {
|
|||
if (supportedPreviewFpsRanges != null && !supportedPreviewFpsRanges.isEmpty()) {
|
||||
int[] minimumSuitableFpsRange = null;
|
||||
for (int[] fpsRange : supportedPreviewFpsRanges) {
|
||||
if (fpsRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX] >= MIN_FPS * 1000) {
|
||||
int fpsMax = fpsRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX];
|
||||
if (fpsMax >= MIN_FPS * 1000 &&
|
||||
(minimumSuitableFpsRange == null ||
|
||||
fpsMax > minimumSuitableFpsRange[Camera.Parameters.PREVIEW_FPS_MAX_INDEX])) {
|
||||
minimumSuitableFpsRange = fpsRange;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (minimumSuitableFpsRange == null) {
|
||||
|
|
Loading…
Reference in a new issue