android wifi扫描 framework层修改扫描间隔

frameworks/opt/net/wifi/service/java/com/android/server/wifi/ScanRequestProxy.java

这个也就是说前台应用可以在120s(2分钟) 扫描 4 次 
*  a) Each foreground app can request a max of
 *   {@link #SCAN_REQUEST_THROTTLE_MAX_IN_TIME_WINDOW_FG_APPS} scan every
 *   {@link #SCAN_REQUEST_THROTTLE_TIME_WINDOW_FG_APPS_MS}.

这个的意思是BackGroud应用可以没30*60s(30分钟)扫描一次
 *  b) Background apps combined can request 1 scan every
 *   {@link #SCAN_REQUEST_THROTTLE_INTERVAL_BG_APPS_MS}.


public static final int SCAN_REQUEST_THROTTLE_TIME_WINDOW_FG_APPS_MS = 120 * 1000;

public static final int SCAN_REQUEST_THROTTLE_MAX_IN_TIME_WINDOW_FG_APPS = 4;

public static final int SCAN_REQUEST_THROTTLE_INTERVAL_BG_APPS_MS = 30 * 60 * 1000;

与android wifi api的介绍一样:

WLAN 扫描功能概览  |  Android 开发者  |  Android Developers

android wifi扫描 framework层修改扫描间隔_第1张图片

 

你可能感兴趣的:(Wifi-蓝牙-FM,android)