Add device name to About Phone page.
The device name is reflected in three places: A Settings.Global flag which can be read by third party apps, the Bluetooth device name, and the Wi-Fi tethering hotspot name. The Bluetooth and Wi-Fi names can be changed independently of the device name, but if the user sets the device name, they are all changed in parallel. Due to the naming restrictions of Bluetooth devices and SSIDs, the SSID naming restrictions apply to the device name. Bug: 63819909 Test: Robotest Change-Id: I3a81535fc07d183557a6fa5d54baef3c7868499c
This commit is contained in:
@@ -35,10 +35,12 @@ public class WifiTetherSSIDPreferenceController extends WifiTetherBasePreference
|
||||
static final String DEFAULT_SSID = "AndroidAP";
|
||||
|
||||
private String mSSID;
|
||||
private WifiDeviceNameTextValidator mWifiDeviceNameTextValidator;
|
||||
|
||||
public WifiTetherSSIDPreferenceController(Context context,
|
||||
OnTetherConfigUpdateListener listener) {
|
||||
super(context, listener);
|
||||
mWifiDeviceNameTextValidator = new WifiDeviceNameTextValidator();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +72,7 @@ public class WifiTetherSSIDPreferenceController extends WifiTetherBasePreference
|
||||
|
||||
@Override
|
||||
public boolean isTextValid(String value) {
|
||||
return !WifiUtils.isSSIDTooLong(value) && !WifiUtils.isSSIDTooShort(value);
|
||||
return mWifiDeviceNameTextValidator.isTextValid(value);
|
||||
}
|
||||
|
||||
public String getSSID() {
|
||||
|
||||
Reference in New Issue
Block a user