Fix WifiQrCode scheme inconsistency issue

- New WifiQrCode design has been moved to WiFi Framework module
 - URI scheme changed from string "DPP" to integer 2

Bug: 356971926
Flag: EXEMPT bugfix
Test: manual test by 15-dpp-fail.apk
Change-Id: I00834ccb32f3ced8345213eef55b5aaa77006f7a
This commit is contained in:
Weng Su
2024-08-07 05:09:35 +08:00
parent 31d5fbff3c
commit 7b0e5560d1

View File

@@ -46,6 +46,7 @@ import android.util.Log;
*
*/
public class WifiQrCode {
private static final String TAG = "WifiQrCode";
static final String SCHEME_DPP = "DPP";
static final String SCHEME_ZXING_WIFI_NETWORK_CONFIG = "WIFI";
static final String PREFIX_DPP = "DPP:";
@@ -119,13 +120,13 @@ public class WifiQrCode {
try {
wifiQrCode = new WifiQrCode(qrCode);
} catch(IllegalArgumentException e) {
Log.e(TAG, "Failed to create WifiQrCode!", e);
return null;
}
if (SCHEME_DPP.equals(wifiQrCode.getScheme())) {
return wifiQrCode;
if (wifiQrCode.getScheme() != UriParserResults.URI_SCHEME_DPP) {
Log.e(TAG, "wifiQrCode scheme is not DPP!");
return null;
}
return null;
return wifiQrCode;
}
}