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

Commit 3d5d9321 authored by Ren-Pei Zeng's avatar Ren-Pei Zeng
Browse files

Camera: Fix max video size for external camera

Similar to https://r.android.com/2148797, fix the frame duration
comparison formula to filter >=30fps resolutions.

Bug: 262577978, 237230436
Test: android.hardware.camera2.cts.RobustnessTest#testVerifyMandatoryOutputCombinationTables
Change-Id: I6aedfbbdf2b3840746f32f4b05c8c158fc3d70c3
parent 61629937
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2429,7 +2429,7 @@ public final class MandatoryStreamCombination {
                long minFrameDuration = mStreamConfigMap.getOutputMinFrameDuration(
                        android.media.MediaRecorder.class, sz);
                // Give some margin for rounding error
                if (minFrameDuration > (1e9 / 30.1)) {
                if (minFrameDuration < (1e9 / 29.9)) {
                    Log.i(TAG, "External camera " + mCameraId + " has max video size:" + sz);
                    return sz;
                }