Merge \\"Add explanatory text displayed when \\'Always-on\\' switch is greyed-out for VPN apps w/targetSdk<24\\" into nyc-mr1-dev am: 4ffd7552a3
am: 8dc82cb436
Change-Id: I826f79e845be20f687b96ba5ba551da13422fcee
This commit is contained in:
@@ -5259,6 +5259,8 @@
|
|||||||
<string name="vpn_no_vpns_added">No VPNs added.</string>
|
<string name="vpn_no_vpns_added">No VPNs added.</string>
|
||||||
<!-- Preference summary for active always-on vpn [CHAR LIMIT=40] -->
|
<!-- Preference summary for active always-on vpn [CHAR LIMIT=40] -->
|
||||||
<string name="vpn_always_on_active">Always-on active</string>
|
<string name="vpn_always_on_active">Always-on active</string>
|
||||||
|
<!-- Preference summary for app not supporting always-on vpn [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="vpn_not_supported_by_this_app">Not supported by this app</string>
|
||||||
|
|
||||||
<!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
|
<!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
|
||||||
<string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
|
<string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
|
||||||
|
@@ -224,8 +224,14 @@ public class AppManagementFragment extends SettingsPreferenceFragment
|
|||||||
mPreferenceForget.checkRestrictionAndSetDisabled(UserManager.DISALLOW_CONFIG_VPN,
|
mPreferenceForget.checkRestrictionAndSetDisabled(UserManager.DISALLOW_CONFIG_VPN,
|
||||||
mUserId);
|
mUserId);
|
||||||
|
|
||||||
if (!checkTargetVersion()) {
|
if (checkTargetVersion()) {
|
||||||
|
// setSummary doesn't override the admin message when user restriction is applied
|
||||||
|
mPreferenceAlwaysOn.setSummary(null);
|
||||||
|
// setEnabled is not required here, as checkRestrictionAndSetDisabled
|
||||||
|
// should have refreshed the enable state.
|
||||||
|
} else {
|
||||||
mPreferenceAlwaysOn.setEnabled(false);
|
mPreferenceAlwaysOn.setEnabled(false);
|
||||||
|
mPreferenceAlwaysOn.setSummary(R.string.vpn_not_supported_by_this_app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user