-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowing ShadowSensorManager to have multiple Sensors of the same typ…
…e added This is possible in Android, as true uniqueness between sensors comes from the pairing of a Sensor's name and type together. Changing how ShadowSensorManager stores the added Sensor instances will allow for multiple of the same time type to exist at once, more closely acting like the real thing. Also adding an overload to sendSensorEventToListeners() method to specify which listeners to push a given SensorEvent to. If you create and register multiple Sensors with ShadowSensorManager then want to push SensorEvents to them, it makes sense to only push it to the listeners that are relevant to the given Sensor PiperOrigin-RevId: 579315510
- Loading branch information
Googler
authored and
Copybara-Service
committed
Nov 7, 2023
1 parent
4b4b7be
commit f3a56f4
Showing
2 changed files
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters