diff options
author | Chung-yih Wang <cywang@google.com> | 2009-08-03 15:01:58 +0800 |
---|---|---|
committer | Chung-yih Wang <cywang@google.com> | 2009-08-03 15:11:36 +0800 |
commit | dc1d5704a725d207b98de1b117847297958d9148 (patch) | |
tree | dd2e823cd931992d8bbafd054dcfedf567bf7055 | |
parent | b86bad9493a331a09dd765bc6e725c0aec969ff6 (diff) | |
download | frameworks_base-dc1d5704a725d207b98de1b117847297958d9148.zip frameworks_base-dc1d5704a725d207b98de1b117847297958d9148.tar.gz frameworks_base-dc1d5704a725d207b98de1b117847297958d9148.tar.bz2 |
Fix the auto notification cleanup when vpn is disconnected.
+ add the log print if the browser give the incorrect data in addCertificate().
-rw-r--r-- | keystore/java/android/security/CertTool.java | 6 | ||||
-rw-r--r-- | packages/VpnServices/src/com/android/server/vpn/VpnService.java | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/keystore/java/android/security/CertTool.java b/keystore/java/android/security/CertTool.java index b1b78ea..989432a 100644 --- a/keystore/java/android/security/CertTool.java +++ b/keystore/java/android/security/CertTool.java @@ -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()"); + } } } diff --git a/packages/VpnServices/src/com/android/server/vpn/VpnService.java b/packages/VpnServices/src/com/android/server/vpn/VpnService.java index b107c7d..b85005c 100644 --- a/packages/VpnServices/src/com/android/server/vpn/VpnService.java +++ b/packages/VpnServices/src/com/android/server/vpn/VpnService.java @@ -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); |