Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6c62a2e authored by Amin Shaikh's avatar Amin Shaikh
Browse files

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
parent 555d12b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ class WriteWifiConfigToNfcDialog extends AlertDialog
                ? Integer.toString(password.length(), HEX_RADIX)
                ? Integer.toString(password.length(), HEX_RADIX)
                : "0" + Character.forDigit(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)) {
        if (wpsNfcConfigurationToken != null && wpsNfcConfigurationToken.contains(passwordHex)) {
            mWpsNfcConfigurationToken = wpsNfcConfigurationToken;
            mWpsNfcConfigurationToken = wpsNfcConfigurationToken;