Make it possible to have open tether network

Previously people could have open tether networks but a restrction
was placed on this sometime in the past. However there is no migration
plan in place for people with open tether networks which will cause
problems when the new requirements are enforced. This CL makes it
so tether networks can be open once more.

Test: robotests
Bug: 65784990
Change-Id: I6e350dd53b9b9f987dd5a4cc317ba18d7f50df79
This commit is contained in:
Salvador Martinez
2018-03-30 11:11:12 -07:00
parent 197be04330
commit 670a3e582f
8 changed files with 81 additions and 59 deletions

View File

@@ -50,10 +50,11 @@ public class WifiUtils {
return ssid.length() < SSID_ASCII_MIN_LENGTH;
}
public static boolean isPasswordValid(String password) {
public static boolean isHotspotPasswordValid(String password) {
if (TextUtils.isEmpty(password)) {
return false;
return true;
}
final int length = password.length();
return length >= PASSWORD_MIN_LENGTH && length <= PASSWORD_MAX_LENGTH;
}