Commit f4eeab05 authored by Mygod's avatar Mygod

Remove apps VPN mode option for Android 4.4

parent 3f92857e
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="proxied_apps_summary">@string/proxied_apps_summary_v21</string>
</resources>
......@@ -50,8 +50,7 @@
<string name="route_entry_gfwlist">GFW List</string>
<string name="route_entry_chinalist">China List</string>
<string name="proxied_apps">Apps VPN mode</string>
<string name="proxied_apps_summary">Configure VPN mode for selected apps, not available on Android 4.x</string>
<string name="proxied_apps_summary_v21">Configure VPN mode for selected apps</string>
<string name="proxied_apps_summary">Configure VPN mode for selected apps</string>
<string name="on">On</string>
<string name="bypass_apps">Bypass Mode</string>
<string name="bypass_apps_summary">Enable this option to bypass selected apps</string>
......
......@@ -66,12 +66,14 @@ class ProfileConfigFragment extends PreferenceFragment with OnMenuItemClickListe
findPreference(Key.password).setSummary("\u2022" * 32)
}
isProxyApps = findPreference(Key.proxyApps).asInstanceOf[SwitchPreference]
isProxyApps.setEnabled(Utils.isLollipopOrAbove && app.usingVpnMode)
isProxyApps.setOnPreferenceClickListener(_ => {
startActivity(new Intent(getActivity, classOf[AppManager]))
isProxyApps.setChecked(true)
false
})
if (Build.VERSION.SDK_INT < 21) isProxyApps.getParent.removePreference(isProxyApps) else {
isProxyApps.setEnabled(app.usingVpnMode)
isProxyApps.setOnPreferenceClickListener(_ => {
startActivity(new Intent(getActivity, classOf[AppManager]))
isProxyApps.setChecked(true)
false
})
}
plugin = findPreference(Key.plugin).asInstanceOf[IconListPreference]
pluginConfigure = findPreference(Key.pluginConfigure).asInstanceOf[EditTextPreference]
plugin.unknownValueSummary = getString(R.string.plugin_unknown)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment