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

Commit 8786b8df authored by Rachel Lee's avatar Rachel Lee
Browse files

Throw exception when VsyncEventData null.

It is only null if unable to get data from SF, for instance SF crash.

Bug: 283421301
Test: atest ChoreographerTest
Change-Id: Ied79f5635b00b8cb4a6f45c636bef0a7cc642e69
parent 0101d423
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1207,6 +1207,10 @@ public final class Choreographer {
            if (newPreferredDeadline < minimumDeadline) {
                DisplayEventReceiver.VsyncEventData latestVsyncEventData =
                        displayEventReceiver.getLatestVsyncEventData();
                if (latestVsyncEventData == null) {
                    throw new IllegalArgumentException(
                            "Could not get VsyncEventData. Did SurfaceFlinger crash?");
                }
                update(frameTimeNanos, latestVsyncEventData);
            } else {
                update(frameTimeNanos, newPreferredIndex);