Fix write wifi config to nfc.

aog/340881 converts the NFC token hex string to lowercase instead of
uppercase. This change updates Settings to encode the password as a
lowercase hex string.

Bug: 35725168
Test: m RunSettingsRoboTests and manually testing writing GIN-2G to nfc
Change-Id: I85e991c4b8a3d7634dea7f945a23a2ef3d3fe448
This commit is contained in:
Amin Shaikh
2017-03-30 14:44:42 -07:00
parent 555d12b427
commit f6c62a2e66

View File

@@ -137,7 +137,7 @@ class WriteWifiConfigToNfcDialog extends AlertDialog
? Integer.toString(password.length(), HEX_RADIX)
: "0" + Character.forDigit(password.length(), HEX_RADIX);
passwordHex = String.format(PASSWORD_FORMAT, passwordLength, passwordHex).toUpperCase();
passwordHex = String.format(PASSWORD_FORMAT, passwordLength, passwordHex).toLowerCase();
if (wpsNfcConfigurationToken != null && wpsNfcConfigurationToken.contains(passwordHex)) {
mWpsNfcConfigurationToken = wpsNfcConfigurationToken;