use of android.net.vpn.PptpProfile in project android_packages_apps_Settings by LineageOS.
the class PptpEditor method createEncryptionPreference.
private Preference createEncryptionPreference(Context c) {
final PptpProfile profile = (PptpProfile) getProfile();
CheckBoxPreference encryption = mEncryption = new CheckBoxPreference(c);
boolean enabled = profile.isEncryptionEnabled();
setCheckBoxTitle(encryption, R.string.vpn_pptp_encryption_title);
encryption.setChecked(enabled);
setEncryptionSummary(encryption, enabled);
encryption.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(Preference pref, Object newValue) {
boolean enabled = (Boolean) newValue;
profile.setEncryptionEnabled(enabled);
setEncryptionSummary(mEncryption, enabled);
return true;
}
});
return encryption;
}
use of android.net.vpn.PptpProfile in project android_packages_apps_Settings by LineageOS.
the class PptpEditor method loadExtraPreferencesTo.
@Override
protected void loadExtraPreferencesTo(PreferenceGroup subpanel) {
Context c = subpanel.getContext();
subpanel.addPreference(createEncryptionPreference(c));
PptpProfile profile = (PptpProfile) getProfile();
}
Aggregations