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

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

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.
parent 23c95b3b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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";