aidl: sensors: Invert value for pickup gesture event

- oplus pickup sensor inverts the value for it to work properly;
- Hence, invert the event check for it to work accordingly.

thanks to @ cyberknight777 for the idea

Test: Build, test lift to check phone.

Change-Id: If09de1758823e2246106d6e278ecc80ca5327ee5
This commit is contained in:
Sugakesshaa
2023-04-26 15:35:27 +08:00
committed by madmax7896
parent 4557783129
commit d7601f36e8

View File

@@ -75,7 +75,7 @@ std::vector<V2_1::Event> HalProxyCallbackBase::processEvents(const std::vector<V
const V2_1::SensorInfo& sensor = mCallback->getSensorInfo(event.sensorHandle);
if (sensor.type == V2_1::SensorType::PICK_UP_GESTURE
&& event.u.scalar != 1) {
&& event.u.scalar != 0) {
continue;
}