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:
Chung-yih Wang
2009-08-03 15:01:58 +08:00
parent b86bad9493
commit dc1d5704a7
2 changed files with 5 additions and 8 deletions

View File

@@ -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()");
}
}
}

View File

@@ -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);