Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 926c4b25 authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

make vpn type strings i18n ready.

parent 7cbc8668
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -16,26 +16,28 @@

package android.net.vpn;

import com.android.internal.R;

/**
 * Enumeration of all supported VPN types.
 * {@hide}
 */
public enum VpnType {
    PPTP("PPTP", "", PptpProfile.class),
    L2TP("L2TP", "", L2tpProfile.class),
    L2TP_IPSEC_PSK("L2TP/IPSec PSK", "Pre-shared key based L2TP/IPSec VPN",
    PPTP("PPTP", R.string.pptp_vpn_description, PptpProfile.class),
    L2TP("L2TP", R.string.l2tp_vpn_description, L2tpProfile.class),
    L2TP_IPSEC_PSK("L2TP/IPSec PSK", R.string.l2tp_ipsec_psk_vpn_description,
            L2tpIpsecPskProfile.class),
    L2TP_IPSEC("L2TP/IPSec CRT", "Certificate based L2TP/IPSec VPN",
    L2TP_IPSEC("L2TP/IPSec CRT", R.string.l2tp_ipsec_crt_vpn_description,
            L2tpIpsecProfile.class);

    private String mDisplayName;
    private String mDescription;
    private int mDescriptionId;
    private Class<? extends VpnProfile> mClass;

    VpnType(String displayName, String description,
    VpnType(String displayName, int descriptionId,
            Class<? extends VpnProfile> klass) {
        mDisplayName = displayName;
        mDescription = description;
        mDescriptionId = descriptionId;
        mClass = klass;
    }

@@ -43,8 +45,12 @@ public enum VpnType {
        return mDisplayName;
    }

    public int getDescriptionId() {
        return mDescriptionId;
    }

    public String getDescription() {
        return mDescription;
        return "";
    }

    public Class<? extends VpnProfile> getProfileClass() {