From f6c62a2e66670eb2c4ee9fc71a56e0e30a4fbd99 Mon Sep 17 00:00:00 2001 From: Amin Shaikh Date: Thu, 30 Mar 2017 14:44:42 -0700 Subject: [PATCH] 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 --- src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java b/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java index 6fca8f2fa76..52871f6cba4 100644 --- a/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java +++ b/src/com/android/settings/wifi/WriteWifiConfigToNfcDialog.java @@ -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;