SF: add PhysicalDisplayId to DisplayMode
A DisplayMode should include the PhysicalDisplayId it
belongs to we could use that to know which display the
mode belogs to.
Change-Id: I781cf30c5ccf886f061a45073b369b4f04cc9140
Bug: 187539899
Test: SF unit tests
Test: refresh rate switching is working on device with
more than one display
Change-Id: I9c73b43384cbe934f7584695e5fe5c53ab402bfb
diff --git a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
index caa1ef0..6cea4c2 100644
--- a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
+++ b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
@@ -53,11 +53,13 @@
const DisplayModePtr mode60 = DisplayMode::Builder(0)
.setId(DisplayModeId(0))
+ .setPhysicalDisplayId(PhysicalDisplayId::fromPort(0))
.setVsyncPeriod(Fps(60.f).getPeriodNsecs())
.setGroup(0)
.build();
const DisplayModePtr mode120 = DisplayMode::Builder(1)
.setId(DisplayModeId(1))
+ .setPhysicalDisplayId(PhysicalDisplayId::fromPort(0))
.setVsyncPeriod(Fps(120.f).getPeriodNsecs())
.setGroup(0)
.build();