-
-
Android 4.4
- 流程
- 问题
1 流程
打开设置里的ap热点
.packages/apps/TvSettings/Settings/src/com/android/settings/TetherSettings.Java
public boolean onPreferenceChange(Preference preference, Object value) {
boolean enable = (Boolean) value;
if (enable) {
startProvisioningIfNecessary(WIFI_TETHERING);
} else {
mWifiApEnabler.setSoftapEnabled(false);
}
return false;
}
然后 startProvisioningIfNecessary(WIFI_TETHERING);
接着startTethering();
接着mWifiApEnabler.setSoftapEnabled(true);
进入
packages/apps/TvSettings/Settingssrc/com/android/settings/wifi/WifiApEnabler.java
setSoftapEnabled
转向frameworks的frameworks/base/wifi/java/android/net/wifi/WiFiManager.java
public boolean setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled) {
try