Merge "Add a config to show the Vpn options menu." into main
This commit is contained in:
@@ -686,6 +686,9 @@
|
|||||||
<!-- Whether to enable the advanced vpn feature. The default is not to. -->
|
<!-- Whether to enable the advanced vpn feature. The default is not to. -->
|
||||||
<bool name="config_advanced_vpn_enabled">false</bool>
|
<bool name="config_advanced_vpn_enabled">false</bool>
|
||||||
|
|
||||||
|
<!-- Whether to show the VPN options menu. The default is to show it. -->
|
||||||
|
<bool name="config_show_vpn_options">true</bool>
|
||||||
|
|
||||||
<!-- An array of uid name for which packages exempt from Wi-Fi permission check. -->
|
<!-- An array of uid name for which packages exempt from Wi-Fi permission check. -->
|
||||||
<string-array name="config_exempt_wifi_permission_uid_name" translatable="false">
|
<string-array name="config_exempt_wifi_permission_uid_name" translatable="false">
|
||||||
<item>@string/config_settingsintelligence_package_name</item>
|
<item>@string/config_settingsintelligence_package_name</item>
|
||||||
|
@@ -142,6 +142,11 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
|||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
|
||||||
|
if (!getContext().getResources().getBoolean(R.bool.config_show_vpn_options)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Although FEATURE_IPSEC_TUNNELS should always be present in android S and beyond,
|
// Although FEATURE_IPSEC_TUNNELS should always be present in android S and beyond,
|
||||||
// keep this check here just to be safe.
|
// keep this check here just to be safe.
|
||||||
if (!getContext().getPackageManager().hasSystemFeature(
|
if (!getContext().getPackageManager().hasSystemFeature(
|
||||||
|
Reference in New Issue
Block a user