OSDN Git Service

Issue an error when VPN connection is lost.
authorHung-ying Tyan <tyanh@google.com>
Mon, 3 Aug 2009 08:22:24 +0000 (16:22 +0800)
committerHung-ying Tyan <tyanh@google.com>
Mon, 3 Aug 2009 08:22:24 +0000 (16:22 +0800)
+ 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.

vpn/java/android/net/vpn/VpnManager.java

index e448e5a..f71bbea 100644 (file)
@@ -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";