diff options
author | Hung-ying Tyan <tyanh@google.com> | 2009-07-30 14:02:48 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2009-07-30 19:14:50 +0800 |
commit | fe8e48cdd5e621905b8c07325dbe77bffffdb4bb (patch) | |
tree | 0b627a159a56a490ff1f655aea85d214da423b2a /vpn | |
parent | b91e2b0292f9f4f76175a18e6e3cf392f3967ae8 (diff) | |
download | frameworks_base-fe8e48cdd5e621905b8c07325dbe77bffffdb4bb.zip frameworks_base-fe8e48cdd5e621905b8c07325dbe77bffffdb4bb.tar.gz frameworks_base-fe8e48cdd5e621905b8c07325dbe77bffffdb4bb.tar.bz2 |
Add state saving mechanism to support proc restart
Also...
+ stop daemons before getting server IP;
+ remove setForeground();
+ add the DBG flag for Log.d calls.
PatchSet 3:
+ add CHALLENGE_ERROR and REMOTE_HUNG_UP to VpnManager
+ broadcast new error codes in VpnService
+ check local IP change instead of dns change
+ move removeStates() to VpnService.onFinalCleanUp()
PatchSet 7:
+ add encryption flag to PptpProfile
+ PptpService and MtpdHelper are revised accordingly
Diffstat (limited to 'vpn')
-rw-r--r-- | vpn/java/android/net/vpn/PptpProfile.java | 12 | ||||
-rw-r--r-- | vpn/java/android/net/vpn/VpnManager.java | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/vpn/java/android/net/vpn/PptpProfile.java b/vpn/java/android/net/vpn/PptpProfile.java index c68bb71..cdc90f0 100644 --- a/vpn/java/android/net/vpn/PptpProfile.java +++ b/vpn/java/android/net/vpn/PptpProfile.java @@ -22,9 +22,21 @@ package android.net.vpn; */ 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; + } } 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"; |