Merge "VPN settings: grey out policy-restricted menus" am: ee4808d37b
am: 905829393d
am: 3ed65b90d0
* commit '3ed65b90d0348b60fc57c08e96986e03fef2fd4e':
VPN settings: grey out policy-restricted menus
This commit is contained in:
@@ -128,6 +128,11 @@ public class VpnSettings extends SettingsPreferenceFragment implements
|
|||||||
public void onPrepareOptionsMenu(Menu menu) {
|
public void onPrepareOptionsMenu(Menu menu) {
|
||||||
super.onPrepareOptionsMenu(menu);
|
super.onPrepareOptionsMenu(menu);
|
||||||
|
|
||||||
|
// Disable all actions if VPN configuration has been disallowed
|
||||||
|
for (int i = 0; i < menu.size(); i++) {
|
||||||
|
menu.getItem(i).setEnabled(!mUnavailable);
|
||||||
|
}
|
||||||
|
|
||||||
// Hide lockdown VPN on devices that require IMS authentication
|
// Hide lockdown VPN on devices that require IMS authentication
|
||||||
if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) {
|
if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) {
|
||||||
menu.findItem(R.id.vpn_lockdown).setVisible(false);
|
menu.findItem(R.id.vpn_lockdown).setVisible(false);
|
||||||
|
Reference in New Issue
Block a user