summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2009-06-17 18:27:18 +0800
committerChung-yih Wang <cywang@google.com>2009-06-17 18:36:13 +0800
commit19e134e494a561324394fcc030ee8e30bb41c614 (patch)
tree53a45f4a35f0372c6646becedf8eff41956d6297 /src
parentb2f1c334de30b2185bec53af81984d015436f610 (diff)
downloadpackages_apps_settings-19e134e494a561324394fcc030ee8e30bb41c614.zip
packages_apps_settings-19e134e494a561324394fcc030ee8e30bb41c614.tar.gz
packages_apps_settings-19e134e494a561324394fcc030ee8e30bb41c614.tar.bz2
Use new Keystore APIs in vpn profile editor.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/vpn/L2tpIpsecEditor.java23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/com/android/settings/vpn/L2tpIpsecEditor.java b/src/com/android/settings/vpn/L2tpIpsecEditor.java
index 2dee92e..bb63772 100644
--- a/src/com/android/settings/vpn/L2tpIpsecEditor.java
+++ b/src/com/android/settings/vpn/L2tpIpsecEditor.java
@@ -34,7 +34,6 @@ class L2tpIpsecEditor extends VpnProfileEditor {
private ListPreference mUserCertificate;
private ListPreference mCaCertificate;
- private ListPreference mUserkey;
private L2tpIpsecProfile mProfile;
@@ -46,7 +45,6 @@ class L2tpIpsecEditor extends VpnProfileEditor {
@Override
protected void loadExtraPreferencesTo(PreferenceGroup subpanel) {
Context c = subpanel.getContext();
- subpanel.addPreference(createUserkeyPreference(c));
subpanel.addPreference(createUserCertificatePreference(c));
subpanel.addPreference(createCaCertificatePreference(c));
}
@@ -56,8 +54,6 @@ class L2tpIpsecEditor extends VpnProfileEditor {
String result = super.validate(c);
if (result != null) {
return result;
- } else if (Util.isNullOrEmpty(mUserkey.getValue())) {
- return c.getString(R.string.vpn_error_userkey_not_selected);
} else if (Util.isNullOrEmpty(mUserCertificate.getValue())) {
return c.getString(R.string.vpn_error_user_certificate_not_selected);
} else if (Util.isNullOrEmpty(mCaCertificate.getValue())) {
@@ -71,7 +67,7 @@ class L2tpIpsecEditor extends VpnProfileEditor {
mUserCertificate = createListPreference(c,
R.string.vpn_user_certificate_title,
mProfile.getUserCertificate(),
- Keystore.getInstance().getAllCertificateKeys(),
+ Keystore.getInstance().getAllUserCertificateKeys(),
new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(
Preference pref, Object newValue) {
@@ -86,7 +82,7 @@ class L2tpIpsecEditor extends VpnProfileEditor {
mCaCertificate = createListPreference(c,
R.string.vpn_ca_certificate_title,
mProfile.getCaCertificate(),
- Keystore.getInstance().getAllCertificateKeys(),
+ Keystore.getInstance().getAllCaCertificateKeys(),
new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(
Preference pref, Object newValue) {
@@ -97,21 +93,6 @@ class L2tpIpsecEditor extends VpnProfileEditor {
return mCaCertificate;
}
- private Preference createUserkeyPreference(Context c) {
- mUserkey = createListPreference(c,
- R.string.vpn_userkey_title,
- mProfile.getUserkey(),
- Keystore.getInstance().getAllUserkeyKeys(),
- new Preference.OnPreferenceChangeListener() {
- public boolean onPreferenceChange(
- Preference pref, Object newValue) {
- mProfile.setUserkey((String) newValue);
- return onPreferenceChangeCommon(pref, newValue);
- }
- });
- return mUserkey;
- }
-
private ListPreference createListPreference(Context c, int titleResId,
String text, String[] keys,
Preference.OnPreferenceChangeListener listener) {