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

Commit d1a8d70d authored by Anthony Stange's avatar Anthony Stange Committed by Automerger Merge Worker
Browse files

Merge "Don't assert while a callback is registered" am: 6a022ad1 am: d5e4905c am: 8a673bc1

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1654108

Change-Id: If6b5fe800955b602be362f269d6350014e384c6a
parents bcb97680 8a673bc1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -462,6 +462,7 @@ TEST_P(SensorsHidlTest, InjectSensorEventData) {

    // Wait for events to be written back to the Event FMQ
    callback.waitForEvents(sensors, milliseconds(1000) /* timeout */);
    getEnvironment()->unregisterCallback();

    for (const auto& s : sensors) {
        auto events = callback.getEvents(s.sensorHandle);
@@ -485,7 +486,6 @@ TEST_P(SensorsHidlTest, InjectSensorEventData) {
        ASSERT_EQ(lastEvent.u.vec3.status, injectedEvent.u.vec3.status);
    }

    getEnvironment()->unregisterCallback();
    ASSERT_EQ(Result::OK, getSensors()->setOperationMode(OperationMode::NORMAL));
}

@@ -603,7 +603,7 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfoType>& sensors, b
                         << " type=" << static_cast<int>(sensor.type) << " name=" << sensor.name);

            Result flushResult = flush(sensor.sensorHandle);
            ASSERT_EQ(flushResult, expectedResponse);
            EXPECT_EQ(flushResult, expectedResponse);
        }
    }