1.wifi信号
/packages/modules/Wifi/framework/java/android/net/wifi/WifiManager.java
@Deprecated
public static int calculateSignalLevel(int rssi, int numLevels) {
if (rssi <= MIN_RSSI) {
//*/update wifi signal
return 1;
/*/
return 0;
//*/
} else if (rssi >= MAX_RSSI) {
return numLevels - 1;
} else {
//*/ update wifi signal
if (true) {
if (rssi >= -60) {
return numLevels - 1;
} else if (rssi < -61 && rssi >= -70) {
return 3;
} else if (rssi < -71 && rssi >= -85) {
return 2;
} else if (rssi < -86 && rssi >= -90) {
return 1;
} else {
return 0;
}
}
//*/
float inputRange = (MAX_RSSI - MIN_RSSI);
float outputRange = (numLevels - 1);
return (int)((float)(rssi - MIN_RSSI) * outputRange / inputRange);
}
}
/packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
<integer-array translatable="false" name="config_wifiRssiLevelThresholds">
<!-- RSSI RSSI Level -->
<item>-91</item> <!-- (-infinity, -88) 0 -->
<item>-85</item> <!-- [-88, -77) 1 -->
<item>-71</item> <!-- [-77, -66) 2 -->
<item>-61</item> <!-- [-66, -55) 3 -->
<!-- [-55, +infinity) 4 -->
</integer-array>
==================wifi漫游设置
/device/droi/common/device.mk
PRODUCT_COPY_FILES += device/droi/common/wifi/wifi.cfg:vendor/firmware/wifi.cfg
/device/droi/common/wifi/wifi.cfg
RoamingRCPIGoodValue 80
RoamingRCPIPoorValue 80
RoamingRCPIDelta0 2
RoamingRCPIDelta1 2
RoamingDynamicHtEnable 1
RoamingRCPIHiDelta0 12
RoamingRcpiHi 90
RoamingEnableScreenoff 1
======
可各自根据客户需求微调