Loading core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -17088,8 +17088,8 @@ package android.hardware { method public boolean flush(android.hardware.SensorEventListener); method public static float getAltitude(float, float); method public static void getAngleChange(float[], float[], float[]); method public android.hardware.Sensor getDefaultSensor(int); method public android.hardware.Sensor getDefaultSensor(int, boolean); method @Nullable public android.hardware.Sensor getDefaultSensor(int); method @Nullable public android.hardware.Sensor getDefaultSensor(int, boolean); method public java.util.List<android.hardware.Sensor> getDynamicSensorList(int); method public static float getInclination(float[]); method public static float[] getOrientation(float[], float[]); core/java/android/hardware/SensorManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -496,7 +497,7 @@ public abstract class SensorManager { * @see #getSensorList(int) * @see Sensor */ public Sensor getDefaultSensor(int type) { public @Nullable Sensor getDefaultSensor(int type) { // TODO: need to be smarter, for now, just return the 1st sensor List<Sensor> l = getSensorList(type); boolean wakeUpSensor = false; Loading Loading @@ -544,7 +545,7 @@ public abstract class SensorManager { * and the application has the necessary permissions, or null otherwise. * @see Sensor#isWakeUpSensor() */ public Sensor getDefaultSensor(int type, boolean wakeUp) { public @Nullable Sensor getDefaultSensor(int type, boolean wakeUp) { List<Sensor> l = getSensorList(type); for (Sensor sensor : l) { if (sensor.isWakeUpSensor() == wakeUp) { Loading Loading
core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -17088,8 +17088,8 @@ package android.hardware { method public boolean flush(android.hardware.SensorEventListener); method public static float getAltitude(float, float); method public static void getAngleChange(float[], float[], float[]); method public android.hardware.Sensor getDefaultSensor(int); method public android.hardware.Sensor getDefaultSensor(int, boolean); method @Nullable public android.hardware.Sensor getDefaultSensor(int); method @Nullable public android.hardware.Sensor getDefaultSensor(int, boolean); method public java.util.List<android.hardware.Sensor> getDynamicSensorList(int); method public static float getInclination(float[]); method public static float[] getOrientation(float[], float[]);
core/java/android/hardware/SensorManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; Loading Loading @@ -496,7 +497,7 @@ public abstract class SensorManager { * @see #getSensorList(int) * @see Sensor */ public Sensor getDefaultSensor(int type) { public @Nullable Sensor getDefaultSensor(int type) { // TODO: need to be smarter, for now, just return the 1st sensor List<Sensor> l = getSensorList(type); boolean wakeUpSensor = false; Loading Loading @@ -544,7 +545,7 @@ public abstract class SensorManager { * and the application has the necessary permissions, or null otherwise. * @see Sensor#isWakeUpSensor() */ public Sensor getDefaultSensor(int type, boolean wakeUp) { public @Nullable Sensor getDefaultSensor(int type, boolean wakeUp) { List<Sensor> l = getSensorList(type); for (Sensor sensor : l) { if (sensor.isWakeUpSensor() == wakeUp) { Loading