Wi-Fi DPP code refine

1. call Activity#setResult only for RESULT_OK case
2. refine @VisibleForTesting usage
     remove redundant assignment otherwise = PRIVATE
     set all @VisibleForTesting annotated methods package scope
3. rename WifiQrCode#SECURITY_WPA to WifiQrCode#SECURITY_WPA_PSK

Bug: 120645817
Test: atest WifiQrCodeTest
      atest WifiDppConfiguratorActivityTest
      atest WifiDppEnrolleeActivityTest
      atest WifiDppQrCodeGeneratorFragmentTest
      atest WifiDppQrCodeScannerFragmentTest
      atest WifiNetworkListFragmentTest
      atest WifiDppChooseSavedWifiNetworkFragmentTest

Change-Id: Id5de7eadc73185716422fc0d197f82bdd025ce45
This commit is contained in:
Arc Wang
2019-01-25 14:12:03 +08:00
parent 4ab826ac5b
commit 8de242ada6
8 changed files with 23 additions and 30 deletions

View File

@@ -139,7 +139,7 @@ public class WifiDppUtils {
case AccessPoint.SECURITY_WEP:
return WifiQrCode.SECURITY_WEP;
case AccessPoint.SECURITY_PSK:
return WifiQrCode.SECURITY_WPA;
return WifiQrCode.SECURITY_WPA_PSK;
case AccessPoint.SECURITY_SAE:
return WifiQrCode.SECURITY_SAE;
default: