Add Enterprise restriction check for Wi-Fi QR code sharing

- In the Internet Picker, if a user tries to long press on the SSIDs
   that cannot be shared, the “Share” option should disappear.

Bug: 203169712
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Change-Id: Iea5a25ba80f29be59c39988bba0dcc4689585461
This commit is contained in:
changbetty
2022-01-06 07:56:40 +00:00
parent 72f9e8eaf0
commit c13303c585
2 changed files with 52 additions and 1 deletions

View File

@@ -566,7 +566,9 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
}
if (mSelectedWifiEntry.canDisconnect()) {
menu.add(Menu.NONE, MENU_ID_SHARE, 0 /* order */, R.string.share);
if (mSelectedWifiEntry.canShare()) {
menu.add(Menu.NONE, MENU_ID_SHARE, 0 /* order */, R.string.share);
}
menu.add(Menu.NONE, MENU_ID_DISCONNECT, 1 /* order */,
R.string.wifi_disconnect_button_text);
}