条件: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 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;
}
}
}
}