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

Skip to content
Commit 26029ee2 authored by Brian Stack's avatar Brian Stack
Browse files

Prevent stale event from being delivered to client

When an on-change sensor is activated, the most recent event is
delivered to the client. A previous change attempted to ensure that
any event that was generated prior to deactivating the sensor would
not be delivered to a client upon activating the sensor. This was to
ensure that an event that was generated in the past, and thus stale,
would not be received by clients. The patch was successful in most
cases, but it did not address the case of a client disabling a sensor
and still maintained a reference to the SensorEventConnection through
the NDK or VNDK.

This patch marks the recent event as stale whenever a sensor
transitions from deactivated to activated. This ensures that the
recent event is always marked as stale, regardless of how the API to
the Sensor Service is utilized.

Bug: 116283108
Test: Verified that stale on-change event is not delivered to a
      client.

Change-Id: Iee9a84ec57f5345fb14f0262b492ad100d05c7bb
parent c4f335d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment