diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-09-24 12:56:29 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-09-24 12:56:29 -0700 |
commit | 07d465ddb8629f128dde193d22de28cfd56663ca (patch) | |
tree | f50514c6455a46a64bfac1fc9bdef35ab8cd6126 /src/com/android/settings/vpn2 | |
parent | 0e9cf8a723c3e03207e905e8e03303ec4b5526dc (diff) | |
download | packages_apps_Settings-07d465ddb8629f128dde193d22de28cfd56663ca.tar.gz packages_apps_Settings-07d465ddb8629f128dde193d22de28cfd56663ca.tar.bz2 packages_apps_Settings-07d465ddb8629f128dde193d22de28cfd56663ca.zip |
Hide lockdown VPN when IMS auth is required.
Bug: 7069782
Change-Id: I978d89894da17164a1e0122adb5acbfda3586fa1
Diffstat (limited to 'src/com/android/settings/vpn2')
-rw-r--r-- | src/com/android/settings/vpn2/VpnSettings.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/settings/vpn2/VpnSettings.java b/src/com/android/settings/vpn2/VpnSettings.java index 931f0c210..de7c034d1 100644 --- a/src/com/android/settings/vpn2/VpnSettings.java +++ b/src/com/android/settings/vpn2/VpnSettings.java @@ -28,6 +28,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.ServiceManager; +import android.os.SystemProperties; import android.preference.Preference; import android.preference.PreferenceGroup; import android.security.Credentials; @@ -105,6 +106,16 @@ public class VpnSettings extends SettingsPreferenceFragment implements } @Override + public void onPrepareOptionsMenu(Menu menu) { + super.onPrepareOptionsMenu(menu); + + // Hide lockdown VPN on devices that require IMS authentication + if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) { + menu.findItem(R.id.vpn_lockdown).setVisible(false); + } + } + + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.vpn_create: { |