Check wifi password length by byte, not char.

Change-Id: Ie6dc441780660c52ff01a2bced79a4e95200d731
Fixes: 79209073
Test: robotest
This commit is contained in:
Fan Zhang
2018-06-08 13:18:07 -07:00
parent 7bc2f98188
commit b6584d0a5a
2 changed files with 6 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ public class WifiUtilsTest {
@Test
public void testSSID() {
assertThat(WifiUtils.isSSIDTooLong("123")).isFalse();
assertThat(WifiUtils.isSSIDTooLong("☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎")).isTrue();
assertThat(WifiUtils.isSSIDTooLong("☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎")).isTrue();
assertThat(WifiUtils.isSSIDTooShort("123")).isFalse();
assertThat(WifiUtils.isSSIDTooShort("")).isTrue();