diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-07-31 17:38:20 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-07-31 17:38:20 -0700 |
commit | 5c1207be90fdf296c1b83034b7c68915e1749284 (patch) | |
tree | e5679f6183458d8179821d5615dabafcb959704d /vpn | |
parent | a8675f67e33bc7337d148358783b0fd138b501ff (diff) | |
download | frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.zip frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.gz frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.bz2 |
donut snapshot
Diffstat (limited to 'vpn')
-rw-r--r-- | vpn/java/android/net/vpn/PptpProfile.java | 26 | ||||
-rw-r--r-- | vpn/java/android/net/vpn/VpnManager.java | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/vpn/java/android/net/vpn/PptpProfile.java b/vpn/java/android/net/vpn/PptpProfile.java index c68bb71..b4b7be5 100644 --- a/vpn/java/android/net/vpn/PptpProfile.java +++ b/vpn/java/android/net/vpn/PptpProfile.java @@ -16,15 +16,41 @@ package android.net.vpn; +import android.os.Parcel; + /** * The profile for PPTP type of VPN. * {@hide} */ public class PptpProfile extends VpnProfile { private static final long serialVersionUID = 1L; + private boolean mEncryption = true; @Override public VpnType getType() { return VpnType.PPTP; } + + /** + * Enables/disables the encryption for PPTP tunnel. + */ + public void setEncryptionEnabled(boolean enabled) { + mEncryption = enabled; + } + + public boolean isEncryptionEnabled() { + return mEncryption; + } + + @Override + protected void readFromParcel(Parcel in) { + super.readFromParcel(in); + mEncryption = in.readInt() > 0; + } + + @Override + public void writeToParcel(Parcel parcel, int flags) { + super.writeToParcel(parcel, flags); + parcel.writeInt(mEncryption ? 1 : 0); + } } diff --git a/vpn/java/android/net/vpn/VpnManager.java b/vpn/java/android/net/vpn/VpnManager.java index 0bf2346..e448e5a 100644 --- a/vpn/java/android/net/vpn/VpnManager.java +++ b/vpn/java/android/net/vpn/VpnManager.java @@ -50,6 +50,10 @@ public class VpnManager { public static final int VPN_ERROR_CONNECTION_FAILED = 2; /** Error code to indicate the server is not known. */ public static final int VPN_ERROR_UNKNOWN_SERVER = 3; + /** Error code to indicate an error from challenge response. */ + public static final int VPN_ERROR_CHALLENGE = 4; + /** Error code to indicate an error of remote server hanging up. */ + public static final int VPN_ERROR_REMOTE_HUNG_UP = 5; private static final int VPN_ERROR_NO_ERROR = 0; public static final String PROFILES_PATH = "/data/misc/vpn/profiles"; |