diff options
author | 2022-03-25 11:49:58 -0700 | |
---|---|---|
committer | 2022-04-01 10:37:02 -0700 | |
commit | b1f7795338af549f22ca8d06809b268dec4f456b (patch) | |
tree | 69da16a28bb064c124323f4d6aa00bad0e9931e2 | |
parent | 4b0129205f6d1479cbc8c3de47c2e863441fca20 (diff) |
Add note on when to call ASensorManager_getDynamicSensorList
Bug: 224562870
Test: N/A. Just a change in the comments.
Change-Id: Ia07fb3aac507a616c585c4e28106a04afea9605a
-rw-r--r-- | include/android/sensor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h index c714b05dd7..6112d5fd0a 100644 --- a/include/android/sensor.h +++ b/include/android/sensor.h @@ -213,6 +213,13 @@ enum { */ ASENSOR_TYPE_HEART_BEAT = 31, /** + * A constant describing a dynamic sensor meta event sensor. + * + * A sensor event of this type is received when a dynamic sensor is added to or removed from + * the system. This sensor type should always use special trigger report mode. + */ + ASENSOR_TYPE_DYNAMIC_SENSOR_META = 32, + /** * This sensor type is for delivering additional sensor information aside * from sensor event data. * @@ -761,6 +768,10 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list); * Each time this is called, the previously returned list is deallocated and * must no longer be used. * + * Clients should call this if they receive a sensor update from + * {@link ASENSOR_TYPE_DYNAMIC_SENSOR_META} indicating the sensors have changed. + * If this happens, previously received lists from this method will be stale. + * * Available since API level 33. * * \param manager the {@link ASensorManager} instance obtained from |