欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android增强WiFi性能

程序员文章站 2022-03-20 10:51:55
条件: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