Android增强WiFi性能
程序员文章站
2024-01-04 08:46:58
条件:WiFi 5G自动切换,当小于-69db和备选WiFi大于-60db是切换 public static int mchangedelay=0; /** * Ask WifiStateMachine permission to switch : * if user is currently streaming voice traffic, * then we should not be allowed to swit...
条件:WiFi 5G自动切换,当小于-69db和备选WiFi大于-60db是切换
frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiAutoJoinController.java
public static int mchangedelay=0;
/**
* Ask WifiStateMachine permission to switch :
* if user is currently streaming voice traffic,
* then we should not be allowed to switch regardless of the delta
*/
if(YlDefineSystemProperties.MMI_BOOL_WIFI_5G_AUTO_JOIN)
{
if ((candidate != null) && (currentConfiguration != null))
{
mToast = Toast.makeText(mContext,"rssi5 =" + currentConfiguration.visibility.rssi5+ ", "+candidate.visibility.rssi5,Toast.LENGTH_SHORT);
mToast.show();
if(mchangedelay>0)
mchangedelay--;
if((candidate.visibility.rssi5!=-127) && (currentConfiguration.visibility.rssi5!=-127) && (mchangedelay==0))
{
if((currentConfiguration.visibility.rssi5<-69) && (candidate.visibility.rssi5>-60))
{
mchangedelay=4;
networkDelta=100;
}
}
}
}
本文地址:https://blog.csdn.net/lwz622/article/details/106909018