From 5602fa6bf5eeec4a647b7d5a119762689270be52 Mon Sep 17 00:00:00 2001 From: David Su Date: Tue, 26 Feb 2019 18:43:13 -0800 Subject: [PATCH] Clarifies Javadocs for setDeviceMobilityState() API Clarifies the meaning of high and low movement mobility states, and that the setDeviceMobilityState() should be called when transitioning between states. Bug: 122614678 Test: compiles Change-Id: Ife9920b81c985238931357ed978983a83d70ffef --- wifi/java/android/net/wifi/WifiManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 6c645fc8ce5da..5ca30fcbf0dbf 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -4575,7 +4575,8 @@ public class WifiManager { public static final int DEVICE_MOBILITY_STATE_UNKNOWN = 0; /** - * High movement device mobility state + * High movement device mobility state. + * e.g. on a bike, in a motor vehicle * * @see #setDeviceMobilityState(int) * @@ -4585,7 +4586,8 @@ public class WifiManager { public static final int DEVICE_MOBILITY_STATE_HIGH_MVMT = 1; /** - * Low movement device mobility state + * Low movement device mobility state. + * e.g. walking, running * * @see #setDeviceMobilityState(int) * @@ -4607,6 +4609,8 @@ public class WifiManager { /** * Updates the device mobility state. Wifi uses this information to adjust the interval between * Wifi scans in order to balance power consumption with scan accuracy. + * The default mobility state when the device boots is {@link #DEVICE_MOBILITY_STATE_UNKNOWN}. + * This API should be called whenever there is a change in the mobility state. * @param state the updated device mobility state * @hide */