Fix the auto notification cleanup when vpn is disconnected.

+ add the log print if the browser give the incorrect data in addCertificate().
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 @@
             }
             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 @@
 
         if (mState == VpnState.IDLE) return;
 
-        // keep the notification when error occurs
-        if (!anyError()) mNotification.disableNotification();
-
         restoreOriginalDns();
         restoreOriginalDomainSuffices();
         mState = VpnState.IDLE;
@@ -269,10 +266,6 @@
         mContext.stopSelf();
     }
 
-    private boolean anyError() {
-        return (mError != null);
-    }
-
     private void restoreOriginalDns() {
         // restore only if they are not overridden
         String vpnDns1 = SystemProperties.get(VPN_DNS1);