summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2009-08-03 16:22:24 +0800
committerHung-ying Tyan <tyanh@google.com>2009-08-03 16:22:24 +0800
commitb06445818593c692c67494ce9e88be29c538f1b1 (patch)
tree21cbb81190f7b6da992c63768acfb0fe083a96ca
parent23c95b3b3277260d7ada14637d9da309695c6c40 (diff)
downloadframeworks_native-b06445818593c692c67494ce9e88be29c538f1b1.zip
frameworks_native-b06445818593c692c67494ce9e88be29c538f1b1.tar.gz
frameworks_native-b06445818593c692c67494ce9e88be29c538f1b1.tar.bz2
Issue an error when VPN connection is lost.
+ Add new error code CONNECTION_LOST to VpnManager. + Make VpnService call onError() instead of onDisconnect() when connection is lost. + Make VpnService broadcast CONNECTION_LOST when that happens.
-rw-r--r--vpn/java/android/net/vpn/VpnManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpn/java/android/net/vpn/VpnManager.java b/vpn/java/android/net/vpn/VpnManager.java
index e448e5a..f71bbea 100644
--- a/vpn/java/android/net/vpn/VpnManager.java
+++ b/vpn/java/android/net/vpn/VpnManager.java
@@ -54,6 +54,8 @@ public class VpnManager {
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;
+ /** Error code to indicate an error of losing connectivity. */
+ public static final int VPN_ERROR_CONNECTION_LOST = 6;
private static final int VPN_ERROR_NO_ERROR = 0;
public static final String PROFILES_PATH = "/data/misc/vpn/profiles";