Hide 'Share' button and 'Add device' preference for a Passpoint Wi-Fi network

Passpoint provisioning is much different from other Wi-Fi networks and ZXing
does not support a QR code format to share a passpoint Wi-Fi network. We
should not show any button to share a passpoint Wi-Fi network.

Bug: 130609037
Test: manual
Change-Id: Ie2538ed9e030e5aa2e88452b50b6592223ca46a8
This commit is contained in:
Arc Wang
2019-04-16 16:46:57 +08:00
parent 96b534951c
commit 994929ecc7
2 changed files with 22 additions and 12 deletions

View File

@@ -345,6 +345,9 @@ public class WifiDppUtils {
*/
public static boolean isSupportConfiguratorQrCodeScanner(Context context,
AccessPoint accessPoint) {
if (accessPoint.isPasspoint()) {
return false;
}
return isSupportWifiDpp(context, accessPoint.getSecurity());
}
@@ -356,6 +359,9 @@ public class WifiDppUtils {
*/
public static boolean isSupportConfiguratorQrCodeGenerator(Context context,
AccessPoint accessPoint) {
if (accessPoint.isPasspoint()) {
return false;
}
return isSupportZxing(context, accessPoint.getSecurity());
}