Loading wifi/java/android/net/wifi/WifiManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,13 @@ public class WifiManager { /** Anything better than or equal to this will show the max bars. */ private static final int MAX_RSSI = -55; /** * Number of RSSI levels used in the framework to initiate * {@link #RSSI_CHANGED_ACTION} broadcast * @hide */ public static final int RSSI_LEVELS = 5; /** * Auto settings in the driver. The driver could choose to operate on both * 2.4 GHz and 5 GHz or make a dynamic decision on selecting the band. Loading wifi/java/android/net/wifi/WifiStateMachine.java +2 −5 Original line number Diff line number Diff line Loading @@ -1458,14 +1458,11 @@ public class WifiStateMachine extends StateMachine { * be displayed in the status bar, and only send the * broadcast if that much more coarse-grained number * changes. This cuts down greatly on the number of * broadcasts, at the cost of not mWifiInforming others * broadcasts, at the cost of not informing others * interested in RSSI of all the changes in signal * level. */ // TODO: The second arg to the call below needs to be a symbol somewhere, but // it's actually the size of an array of icons that's private // to StatusBar Policy. int newSignalLevel = WifiManager.calculateSignalLevel(newRssi, 4); int newSignalLevel = WifiManager.calculateSignalLevel(newRssi, WifiManager.RSSI_LEVELS); if (newSignalLevel != mLastSignalLevel) { sendRssiChangeBroadcast(newRssi); } Loading Loading
wifi/java/android/net/wifi/WifiManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,13 @@ public class WifiManager { /** Anything better than or equal to this will show the max bars. */ private static final int MAX_RSSI = -55; /** * Number of RSSI levels used in the framework to initiate * {@link #RSSI_CHANGED_ACTION} broadcast * @hide */ public static final int RSSI_LEVELS = 5; /** * Auto settings in the driver. The driver could choose to operate on both * 2.4 GHz and 5 GHz or make a dynamic decision on selecting the band. Loading
wifi/java/android/net/wifi/WifiStateMachine.java +2 −5 Original line number Diff line number Diff line Loading @@ -1458,14 +1458,11 @@ public class WifiStateMachine extends StateMachine { * be displayed in the status bar, and only send the * broadcast if that much more coarse-grained number * changes. This cuts down greatly on the number of * broadcasts, at the cost of not mWifiInforming others * broadcasts, at the cost of not informing others * interested in RSSI of all the changes in signal * level. */ // TODO: The second arg to the call below needs to be a symbol somewhere, but // it's actually the size of an array of icons that's private // to StatusBar Policy. int newSignalLevel = WifiManager.calculateSignalLevel(newRssi, 4); int newSignalLevel = WifiManager.calculateSignalLevel(newRssi, WifiManager.RSSI_LEVELS); if (newSignalLevel != mLastSignalLevel) { sendRssiChangeBroadcast(newRssi); } Loading