我是靠谱客的博主 踏实帆布鞋,最近开发中收集的这篇文章主要介绍Android 修改默认wifi,bt,热点名称,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述


.../Wifi/service/ServiceWifiResources/res/values/config.xml
| 2 +-
.../service/java/com/android/server/wifi/WifiApConfigStore.java | 2 +-
.../java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
mode change 100644 => 100755 packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
mode change 100644 => 100755 packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java
mode change 100644 => 100755 packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
diff --git a/packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml b/packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
old mode 100644
new mode 100755
index f25311e037..0c07b92972
--- a/packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
+++ b/packages/modules/Wifi/service/ServiceWifiResources/res/values/config.xml
@@ -362,7 +362,7 @@
<string name="config_wifi_tcp_buffers" translatable="false">524288,1048576,2097152,262144,524288,1048576</string>
<!-- Do not translate. Default access point SSID used for tethering -->
-
<string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>
+
<string name="wifi_tether_configure_ssid_default" translatable="false">R60</string>
<!-- Do not translate. Default access point SSID used for local only hotspot -->
<string name="wifi_localhotspot_configure_ssid_default" translatable="false">AndroidShare</string>
diff --git a/packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java b/packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java
old mode 100644
new mode 100755
index d2809403c2..24d042af73
--- a/packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java
+++ b/packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java
@@ -347,7 +347,7 @@ public class WifiApConfigStore {
SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
configBuilder.setBand(generateDefaultBand(mContext));
configBuilder.setSsid(mContext.getResources().getString(
-
R.string.wifi_tether_configure_ssid_default) + "_" + getRandomIntForDefaultSsid());
+
R.string.wifi_tether_configure_ssid_default));// + "_" + getRandomIntForDefaultSsid());
if (ApConfigUtil.isWpa3SaeSupported(mContext)) {
configBuilder.setPassphrase(generatePassword(),
SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
diff --git a/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
old mode 100644
new mode 100755
index 86c3ad3d78..81c810c681
--- a/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -3989,7 +3989,7 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
private String getPersistedDeviceName() {
String deviceName = mSettingsConfigStore.get(WIFI_P2P_DEVICE_NAME);
-
if (null != deviceName) return deviceName;
+
if (null != deviceName) return
mContext.getResources().getString(R.string.wifi_tether_configure_ssid_default);
String prefix = mWifiGlobals.getWifiP2pDeviceNamePrefix();
if (DEVICE_NAME_PREFIX_LENGTH_MAX < prefix.getBytes(StandardCharsets.UTF_8).length
--
2.29.0
vendor/qcom/opensource/commonsys/system/bt/btif/src/btif_dm.cc
static char* btif_get_default_local_name() {
if (btif_default_local_name[0] == '') {
int max_len = sizeof(btif_default_local_name) - 1;
// if (BTM_DEF_LOCAL_NAME[0] != '') {
if (false/*BTM_DEF_LOCAL_NAME[0] != ''*/) {
strncpy(btif_default_local_name, BTM_DEF_LOCAL_NAME, max_len);
} else {
char prop_model[PROPERTY_VALUE_MAX];
osi_property_get(PROPERTY_PRODUCT_MODEL, prop_model, "");
strncpy(btif_default_local_name, prop_model, max_len);
}
btif_default_local_name[max_len] = '';
}
return btif_default_local_name;
}

最后

以上就是踏实帆布鞋为你收集整理的Android 修改默认wifi,bt,热点名称的全部内容,希望文章能够帮你解决Android 修改默认wifi,bt,热点名称所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部