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

Commit 88df4a85 authored by Rachel Lee's avatar Rachel Lee
Browse files

Fix frame timelines length on USE_VSYNC = false

Bug: 285093700
Test: atest ChoreographerTest
Change-Id: I111dc61c67335ffc46da5bed7c187bc4ad615d4a
parent 1d794238
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1167,10 +1167,9 @@ public final class Choreographer {
         */
        FrameTimeline update(
                long frameTimeNanos, DisplayEventReceiver.VsyncEventData vsyncEventData) {
            if (vsyncEventData.frameTimelinesLength == 0) {
                throw new IllegalArgumentException(
                        "Vsync event timelines length must be greater than 0");
            }
            // Even if the frame timelines length is 0, continue with allocation for API
            // FrameData.getFrameTimelines consistency. The 0 length frame timelines code path
            // should only occur when USE_VSYNC property is false.
            if (mFrameTimelines.length != vsyncEventData.frameTimelinesLength) {
                allocateFrameTimelines(vsyncEventData.frameTimelinesLength);
            }