文件位置
frameworks/base/wifi/Java/Android/net/wifi/WifiApConfigStore.java
/* Generate a default WPA2 based configuration with a random password.
We are changing the Wifi Ap configuration storage from secure settings to a
flat file accessible only by the system. A WPA2 based default configuration
will keep the device secure after the update */
private void setDefaultApConfiguration() {
WifiConfiguration config = new WifiConfiguration();
config.SSID = mContext.getString(R.string.wifi_tether_configure_ssid_default); //设置热点名
config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK);
String randomUUID = UUID.randomUUID().toString();
//first 12 chars from xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
//config.preSharedKey = randomUUID.substring(0, 8) + randomUUID.substring(9,13);
config.preSharedKey = "12345678"; //设置热点密码
sendMessage(WifiStateMachine.CMD_SET_AP_CONFIG, config);
}
热点名对应的资源文件位置
frameworks\base\core\res\res\values\strings.xml