From 0c285639a7c8f45bb91eb0cc9f5bb3fe712eb6f6 Mon Sep 17 00:00:00 2001 From: Brian Duddie Date: Mon, 14 Feb 2022 10:41:29 -0800 Subject: [PATCH] Clarify optionality of velocity in head tracker sensor Bug: 218911221 Test: n/a, comment update only Change-Id: I893397c9446e5c976e3dc9e68d65d67e7128ba9e --- core/java/android/hardware/SensorEvent.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java index 45d4c09921a64..f68fb9d5db566 100644 --- a/core/java/android/hardware/SensorEvent.java +++ b/core/java/android/hardware/SensorEvent.java @@ -664,16 +664,20 @@ public class SensorEvent { * The first three elements provide the transform from the (arbitrary, possibly slowly drifting) * reference frame to the head frame. The magnitude of this vector is in range [0, π] * radians, while the value of individual axes is in range [-π, π]. The next three - * elements provide the estimated rotational velocity of the user's head relative to itself, in - * radians per second. + * elements optionally provide the estimated rotational velocity of the user's head relative to + * itself, in radians per second. If a given sensor does not support determining velocity, these + * elements are set to 0. * * * *

{@link android.hardware.Sensor#TYPE_ACCELEROMETER_LIMITED_AXES