Loading core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ public class ConnectivityManagerTestBase extends InstrumentationTestCase { * @param length required length of the string * @return */ protected boolean isHex(String input, int length) { protected static boolean isHex(String input, int length) { Pattern p = Pattern.compile(String.format("[0-9A-Fa-f]{%d}", length)); return p.matcher(input).matches(); } Loading core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ public class WifiAssociationTest extends ConnectivityManagerTestBase { config.allowedProtocols.set(Protocol.WPA); config.allowedPairwiseCiphers.set(PairwiseCipher.TKIP); config.allowedGroupCiphers.set(GroupCipher.TKIP); if (mPassword.matches("[0-9A-Fa-f]{64}")) { if (isHex(mPassword, 64)) { config.preSharedKey = mPassword; } else { config.preSharedKey = '"' + mPassword + '"'; Loading @@ -150,7 +150,7 @@ public class WifiAssociationTest extends ConnectivityManagerTestBase { config.allowedPairwiseCiphers.set(PairwiseCipher.CCMP); config.allowedGroupCiphers.set(GroupCipher.CCMP); config.allowedProtocols.set(Protocol.RSN); if (mPassword.matches("[0-9A-Fa-f]{64}")) { if (isHex(mPassword, 64)) { config.preSharedKey = mPassword; } else { config.preSharedKey = '"' + mPassword + '"'; Loading Loading
core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java +1 −1 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ public class ConnectivityManagerTestBase extends InstrumentationTestCase { * @param length required length of the string * @return */ protected boolean isHex(String input, int length) { protected static boolean isHex(String input, int length) { Pattern p = Pattern.compile(String.format("[0-9A-Fa-f]{%d}", length)); return p.matcher(input).matches(); } Loading
core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ public class WifiAssociationTest extends ConnectivityManagerTestBase { config.allowedProtocols.set(Protocol.WPA); config.allowedPairwiseCiphers.set(PairwiseCipher.TKIP); config.allowedGroupCiphers.set(GroupCipher.TKIP); if (mPassword.matches("[0-9A-Fa-f]{64}")) { if (isHex(mPassword, 64)) { config.preSharedKey = mPassword; } else { config.preSharedKey = '"' + mPassword + '"'; Loading @@ -150,7 +150,7 @@ public class WifiAssociationTest extends ConnectivityManagerTestBase { config.allowedPairwiseCiphers.set(PairwiseCipher.CCMP); config.allowedGroupCiphers.set(GroupCipher.CCMP); config.allowedProtocols.set(Protocol.RSN); if (mPassword.matches("[0-9A-Fa-f]{64}")) { if (isHex(mPassword, 64)) { config.preSharedKey = mPassword; } else { config.preSharedKey = '"' + mPassword + '"'; Loading