Update VPN preference state after disallow configuring VPN policy has changed.
1. When Settings > More and change disallow configuring VPN policy and resume Settings, update VPN preference state. 2. When Settings > More > VPN and change disallow configuring VPN policy and resume VPN Settings, update its state. Test: manual Signed-off-by : Sungmin Lee <insight.lee@lge.com> Change-Id: I4f3c85733ca6ba05cba46e2f4854f54a42b10c21
This commit is contained in:
@@ -164,6 +164,7 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
mUnavailable = mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN);
|
||||
if (mUnavailable) {
|
||||
// Show a message to explain that VPN settings have been disabled
|
||||
if (!isUiRestrictedByOnlyAdmin()) {
|
||||
@@ -172,6 +173,7 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
getPreferenceScreen().removeAll();
|
||||
return;
|
||||
} else {
|
||||
setEmptyView(getEmptyTextView());
|
||||
getEmptyTextView().setText(R.string.vpn_no_vpns_added);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user