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

Commit 8a673bc1 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

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

Change-Id: I1635b058ca73c9c7d833c328e2caf59e715fcabe
parents b210d975 d5e4905c
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);
        }
    }