热点默认名称后面跟的随机数
java
WifiApConfigStore.java
这儿可以设置热点的默认随机数,原生系统默认是4位
private static final int RAND_SSID_INT_MIN = 1000;
private static final int RAND_SSID_INT_MAX = 9999;
private static int getRandomIntForDefaultSsid() {
Log.i(TAG, "getRandomIntForDefaultSsid");
Random random = new Random();
return random.nextInt((RAND_SSID_INT_MAX - RAND_SSID_INT_MIN) + 1) + RAND_SSID_INT_MIN;
}
如果想默认随机数是6位,可以改为
private static final int RAND_SSID_INT_MIN = 100000;
private static final int RAND_SSID_INT_MAX = 999999;
frameworks/opt/net/wifi/service/res/values/config.xml
改一下这个wifi_tether_configure_ssid_default 配置,就可以更改热点默认的字符串
XML
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>