Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90582939 authored by Robin Lee's avatar Robin Lee Committed by android-build-merger
Browse files

Merge "VPN settings: grey out policy-restricted menus"

am: ee4808d3

* commit 'ee4808d3':
  VPN settings: grey out policy-restricted menus
parents 7b9f79bb ee4808d3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -129,6 +129,11 @@ public class VpnSettings extends SettingsPreferenceFragment implements
    public void onPrepareOptionsMenu(Menu 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
        if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) {
            menu.findItem(R.id.vpn_lockdown).setVisible(false);