Fix the auto notification cleanup when vpn is disconnected.
+ add the log print if the browser give the incorrect data in addCertificate().
This commit is contained in:
@@ -209,6 +209,10 @@ public class CertTool {
|
|||||||
}
|
}
|
||||||
freeX509Certificate(handle);
|
freeX509Certificate(handle);
|
||||||
}
|
}
|
||||||
if (intent != null) context.startActivity(intent);
|
if (intent != null) {
|
||||||
|
context.startActivity(intent);
|
||||||
|
} else {
|
||||||
|
Log.w("CertTool", "incorrect data for addCertificate()");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,9 +256,6 @@ abstract class VpnService<E extends VpnProfile> implements Serializable {
|
|||||||
|
|
||||||
if (mState == VpnState.IDLE) return;
|
if (mState == VpnState.IDLE) return;
|
||||||
|
|
||||||
// keep the notification when error occurs
|
|
||||||
if (!anyError()) mNotification.disableNotification();
|
|
||||||
|
|
||||||
restoreOriginalDns();
|
restoreOriginalDns();
|
||||||
restoreOriginalDomainSuffices();
|
restoreOriginalDomainSuffices();
|
||||||
mState = VpnState.IDLE;
|
mState = VpnState.IDLE;
|
||||||
@@ -269,10 +266,6 @@ abstract class VpnService<E extends VpnProfile> implements Serializable {
|
|||||||
mContext.stopSelf();
|
mContext.stopSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean anyError() {
|
|
||||||
return (mError != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void restoreOriginalDns() {
|
private void restoreOriginalDns() {
|
||||||
// restore only if they are not overridden
|
// restore only if they are not overridden
|
||||||
String vpnDns1 = SystemProperties.get(VPN_DNS1);
|
String vpnDns1 = SystemProperties.get(VPN_DNS1);
|
||||||
|
|||||||
Reference in New Issue
Block a user