Merge "Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces" into udc-qpr-dev am: dca9c6b88f am: a20cb88cf6

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24285925

Change-Id: Ib3aa9df47d9fa91a2fa56c6d771b9da0c9d512f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Etan Cohen
2023-08-05 01:15:16 +00:00
committed by Automerger Merge Worker
2 changed files with 77 additions and 2 deletions

View File

@@ -160,8 +160,9 @@ public class WifiQrCode {
private String getValueOrNull(List<String> keyValueList, String prefix) {
for (String keyValue : keyValueList) {
if (keyValue.startsWith(prefix)) {
return keyValue.substring(prefix.length());
String strippedKeyValue = keyValue.stripLeading();
if (strippedKeyValue.startsWith(prefix)) {
return strippedKeyValue.substring(prefix.length());
}
}