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

Commit 3e519974 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SurfaceFlinger: fix invalid PhysicalDisplayId in onConfigChanged event"

parents e78acb5c af0ec27e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ DisplayEventReceiver::Event makeVSync(PhysicalDisplayId displayId, nsecs_t times
    return event;
}

DisplayEventReceiver::Event makeConfigChanged(uint32_t displayId, int32_t configId) {
DisplayEventReceiver::Event makeConfigChanged(PhysicalDisplayId displayId, int32_t configId) {
    DisplayEventReceiver::Event event;
    event.header = {DisplayEventReceiver::DISPLAY_EVENT_CONFIG_CHANGED, displayId, systemTime()};
    event.config.configId = configId;
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ namespace {

constexpr PhysicalDisplayId INTERNAL_DISPLAY_ID = 111;
constexpr PhysicalDisplayId EXTERNAL_DISPLAY_ID = 222;
constexpr PhysicalDisplayId DISPLAY_ID_64BIT = 0xabcd12349876fedcULL;

class MockVSyncSource : public VSyncSource {
public:
@@ -470,5 +471,10 @@ TEST_F(EventThreadTest, postConfigChangedExternal) {
    expectConfigChangedEventReceivedByConnection(EXTERNAL_DISPLAY_ID, 5);
}

TEST_F(EventThreadTest, postConfigChangedPrimary64bit) {
    mThread->onConfigChanged(DISPLAY_ID_64BIT, 7);
    expectConfigChangedEventReceivedByConnection(DISPLAY_ID_64BIT, 7);
}

} // namespace
} // namespace android