diff options
| author | 2023-12-08 09:02:20 +0100 | |
|---|---|---|
| committer | 2023-12-27 10:43:30 +0100 | |
| commit | 71db5f82e6734073549525c9b8428ba03fdd7ac6 (patch) | |
| tree | 54fa90904767f734ebe0dd31038ebdb5892b2fbd /libs/ultrahdr/jpegencoderhelper.cpp | |
| parent | a5643cb05f6d4b5012d443dbdd3077b3fae2bf0c (diff) | |
Respect deviceId in SensorManager cache.
Do not use the cached SensorManager if the device association
of the underlying package has changed.
Since the SensorManager is cached per package, if the deviceId
changes, then the native SensorManager will always return the wrong
sensors. This is seen in the failing CTS.
The most straight-forward solution is to refresh the cache when the
device for that UID has changed. It would be better to have an API
that takes a deviceId but that's a longer term fix - b/306575095
This change is effectively flagged by the read-only flag
android.companion.virtual.flags.enable_native_vdm. When it is
disabled, the deviceId will always be 0 (i.e. default device).
Test: atest VirtualSensorNativeTest
Bug: 306575095
Fix: 317495754
Change-Id: If02beb9f3eceec19c104ae03fcb0a8fefb46f85f
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions