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

Commit dc1d5704 authored by Chung-yih Wang's avatar Chung-yih Wang
Browse files

Fix the auto notification cleanup when vpn is disconnected.

+ add the log print if the browser give the incorrect data in addCertificate().
parent b86bad94
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -209,6 +209,10 @@ public class CertTool {
            }
            freeX509Certificate(handle);
        }
        if (intent != null) context.startActivity(intent);
        if (intent != null) {
            context.startActivity(intent);
        } else {
            Log.w("CertTool", "incorrect data for addCertificate()");
        }
    }
}
+0 −7
Original line number Diff line number Diff line
@@ -256,9 +256,6 @@ abstract class VpnService<E extends VpnProfile> implements Serializable {

        if (mState == VpnState.IDLE) return;

        // keep the notification when error occurs
        if (!anyError()) mNotification.disableNotification();

        restoreOriginalDns();
        restoreOriginalDomainSuffices();
        mState = VpnState.IDLE;
@@ -269,10 +266,6 @@ abstract class VpnService<E extends VpnProfile> implements Serializable {
        mContext.stopSelf();
    }

    private boolean anyError() {
        return (mError != null);
    }

    private void restoreOriginalDns() {
        // restore only if they are not overridden
        String vpnDns1 = SystemProperties.get(VPN_DNS1);