Search in sources :

Example 1 with VpnType

use of android.net.vpn.VpnType in project android_packages_apps_Settings by LineageOS.

the class VpnTypeSelection method initTypeList.

private void initTypeList() {
    PreferenceScreen root = getPreferenceScreen();
    for (VpnType t : VpnManager.getSupportedVpnTypes()) {
        String displayName = t.getDisplayName();
        String message = String.format(getString(R.string.vpn_edit_title_add), displayName);
        mTypeMap.put(message, t);
        Preference pref = new Preference(this);
        pref.setTitle(message);
        pref.setSummary(t.getDescriptionId());
        root.addPreference(pref);
    }
}
Also used : VpnType(android.net.vpn.VpnType) PreferenceScreen(android.preference.PreferenceScreen) Preference(android.preference.Preference)

Aggregations

VpnType (android.net.vpn.VpnType)1 Preference (android.preference.Preference)1 PreferenceScreen (android.preference.PreferenceScreen)1