OSDN Git Service

Update Java doc of SensorManager.createDirectChannel
authorPeng Xu <pengxu@google.com>
Wed, 5 Jul 2017 22:21:12 +0000 (15:21 -0700)
committerPeng Xu <pengxu@google.com>
Wed, 5 Jul 2017 22:26:03 +0000 (22:26 +0000)
Java doc was left out when addressing API reviewer comments.
This CL fix the discrepancy between the actual logic and java doc.

Bug: 36550285
Test: compiles
Change-Id: I6406892ecdcc5d02f11966fa3fb0b81ed8d3b285

core/java/android/hardware/SensorManager.java

index 4bc62b1..e1cd451 100644 (file)
@@ -894,8 +894,9 @@ public abstract class SensorManager {
      * to free up resource in sensor system associated with the direct channel.
      *
      * @param mem A {@link android.os.MemoryFile} shared memory object.
-     * @return A {@link android.hardware.SensorDirectChannel} object if successful, null otherwise.
+     * @return A {@link android.hardware.SensorDirectChannel} object.
      * @throws NullPointerException when mem is null.
+     * @throws UncheckedIOException if not able to create channel.
      * @see SensorDirectChannel#close()
      * @see #configureDirectChannel(SensorDirectChannel, Sensor, int)
      */
@@ -916,9 +917,9 @@ public abstract class SensorManager {
      * to free up resource in sensor system associated with the direct channel.
      *
      * @param mem A {@link android.hardware.HardwareBuffer} shared memory object.
-     * @return A {@link android.hardware.SensorDirectChannel} object if successful,
-     *         null otherwise.
+     * @return A {@link android.hardware.SensorDirectChannel} object.
      * @throws NullPointerException when mem is null.
+     * @throws UncheckedIOException if not able to create channel.
      * @see SensorDirectChannel#close()
      * @see #configureDirectChannel(SensorDirectChannel, Sensor, int)
      */