SF: Remove dead code from Scheduler
While looking into some other Scheduler changes, I noticed that both
Scheduler::mRenderEventConnection and
Scheduler::mLastCompositeEventConnection are initialized but otherwise
unused. Scheduler::getEventConnection() is never called to retrieve
either value.
As there doesn't seem to be any use for them, let's remove them.
This change also required removing test fixture setup from the unit
tests, as the tests worked to install test double implementations.
Test: atest libsurfaceflinger_unittest
Bug: None
Flag: EXEMPT dead code
Change-Id: Ic004df96dd5fe3dadd0cd1455cd85506736a1875
diff --git a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
index 45ca7e2..ac09cbc 100644
--- a/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
+++ b/services/surfaceflinger/tests/unittests/SchedulerTest.cpp
@@ -124,7 +124,7 @@
// createConnection call to scheduler makes a createEventConnection call to EventThread. Make
// sure that call gets executed and returns an EventThread::Connection object.
- EXPECT_CALL(*mEventThread, createEventConnection(_, _))
+ EXPECT_CALL(*mEventThread, createEventConnection(_))
.WillRepeatedly(Return(mEventThreadConnection));
mScheduler->setEventThread(Cycle::Render, std::move(eventThread));
@@ -797,7 +797,7 @@
const auto mockConnection1 = sp<MockEventThreadConnection>::make(mEventThread);
const auto mockConnection2 = sp<MockEventThreadConnection>::make(mEventThread);
- EXPECT_CALL(*mEventThread, createEventConnection(_, _))
+ EXPECT_CALL(*mEventThread, createEventConnection(_))
.WillOnce(Return(mockConnection1))
.WillOnce(Return(mockConnection2));