Temporary workaround for getDisplayStats

Prior to Icdb80253436b4d0034fc20fcae8583efb7c30292, there was only one
VsyncSchedule, so the display parameter was not interesting.

Now that there are multiple VsyncSchedules, we should return the
VsyncSchedule corresponding to the passed in display. But current
callers just pass a null binder token.

Use the pacesetter's VsyncSchedule for now. Most of the time, for
example on devices with only one display (or one active display), this
is correct.

For a device with more than one active display, this may not be correct,
so a follow-on change is necessary.

Bug: 275691508
Bug: 275691150
Test: manual
Change-Id: I01ed2978b04a7707a706050902d3041ec9ab4eca
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 8ce479a..8c77253 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1153,7 +1153,10 @@
         displayIdOpt = getPhysicalDisplayIdLocked(displayToken);
     }
 
-    if (!displayIdOpt) {
+    // TODO (b/277364366): Clients should be updated to pass in the display they
+    // want, rather than us picking an arbitrary one (the pacesetter, in this
+    // case).
+    if (displayToken && !displayIdOpt) {
         ALOGE("%s: Invalid physical display token %p", __func__, displayToken.get());
         return NAME_NOT_FOUND;
     }