@@ -74,14 +74,12 @@ void PowerAdvisorTest::SetUp() {
7474void PowerAdvisorTest::startPowerHintSession (bool returnValidSession) {
7575 mMockPowerHintSession = ndk::SharedRefBase::make<NiceMock<MockIPowerHintSession>>();
7676 if (returnValidSession) {
77- ON_CALL (*mMockPowerHalController , createHintSessionWithConfig)
78- .WillByDefault (DoAll (SetArgPointee<5 >(aidl::android::hardware::power::SessionConfig{
79- .id = 12 }),
80- Return (HalResult<std::shared_ptr<IPowerHintSession>>::
81- fromStatus (binder::Status::ok (),
82- mMockPowerHintSession ))));
77+ ON_CALL (*mMockPowerHalController , createHintSession)
78+ .WillByDefault (
79+ Return (HalResult<std::shared_ptr<IPowerHintSession>>::
80+ fromStatus (binder::Status::ok (), mMockPowerHintSession )));
8381 } else {
84- ON_CALL (*mMockPowerHalController , createHintSessionWithConfig )
82+ ON_CALL (*mMockPowerHalController , createHintSession )
8583 .WillByDefault (Return (HalResult<std::shared_ptr<IPowerHintSession>>::
8684 fromStatus (binder::Status::ok (), nullptr )));
8785 }
@@ -285,7 +283,7 @@ TEST_F(PowerAdvisorTest, hintSessionValidWhenNullFromPowerHAL) {
285283}
286284
287285TEST_F (PowerAdvisorTest, hintSessionOnlyCreatedOnce) {
288- EXPECT_CALL (*mMockPowerHalController , createHintSessionWithConfig (_, _, _, _, _, _)).Times (1 );
286+ EXPECT_CALL (*mMockPowerHalController , createHintSession ( _, _, _, _)).Times (1 );
289287 mPowerAdvisor ->onBootFinished ();
290288 startPowerHintSession ();
291289 mPowerAdvisor ->startPowerHintSession ({1 , 2 , 3 });
@@ -337,7 +335,7 @@ TEST_F(PowerAdvisorTest, hintSessionTestNotifyReportRace) {
337335 return ndk::ScopedAStatus::fromExceptionCode (-127 );
338336 });
339337
340- ON_CALL (*mMockPowerHalController , createHintSessionWithConfig )
338+ ON_CALL (*mMockPowerHalController , createHintSession )
341339 .WillByDefault (Return (
342340 HalResult<std::shared_ptr<IPowerHintSession>>::
343341 fromStatus (ndk::ScopedAStatus::fromExceptionCode (-127 ), nullptr )));
0 commit comments