Merge "Update code comments to mention sensor name uniqueness." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5f9e20b375
@@ -952,7 +952,8 @@ public final class Sensor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return name string of the sensor.
|
* @return name string of the sensor. The name is guaranteed to be unique
|
||||||
|
* for a particular sensor type.
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return mName;
|
return mName;
|
||||||
|
|||||||
@@ -399,7 +399,9 @@ public abstract class SensorManager {
|
|||||||
* Use this method to get the list of available sensors of a certain type.
|
* Use this method to get the list of available sensors of a certain type.
|
||||||
* Make multiple calls to get sensors of different types or use
|
* Make multiple calls to get sensors of different types or use
|
||||||
* {@link android.hardware.Sensor#TYPE_ALL Sensor.TYPE_ALL} to get all the
|
* {@link android.hardware.Sensor#TYPE_ALL Sensor.TYPE_ALL} to get all the
|
||||||
* sensors.
|
* sensors. Note that the {@link android.hardware.Sensor#getName()} is
|
||||||
|
* expected to yield a value that is unique across any sensors that return
|
||||||
|
* the same value for {@link android.hardware.Sensor#getType()}.
|
||||||
*
|
*
|
||||||
* <p class="note">
|
* <p class="note">
|
||||||
* NOTE: Both wake-up and non wake-up sensors matching the given type are
|
* NOTE: Both wake-up and non wake-up sensors matching the given type are
|
||||||
|
|||||||
Reference in New Issue
Block a user