1,android4.4修改WiFi里显示的WiFi名
android\frameworks\base\wifi\java\android\net\wifi\p2p下的
WifiP2pService.java下的
private String getPersistedDeviceName() {
String deviceName = Settings.Global.getString(mContext.getContentResolver(),
Settings.Global.WIFI_P2P_DEVICE_NAME);
if (deviceName == null) {
/* We use the 4 digits of the ANDROID_ID to have a friendly
* default that has low likelihood of collision with a peer */
String id = Settings.Secure.getString(mContext.getContentResolver(),
Settings.Secure.ANDROID_ID);
return "Android_" + id.substring(0,4); //把这个return的值改成你想要的WiFi名称
}
return deviceName;
}
2,默认位置服务选中“省电模式–Wifi定位”
public void onRadioButtonClicked(RadioButtonPreference emiter) {
int mode = Settings.Secure.LOCATION_MODE