summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keystore/java/android/security/CertTool.java6
-rw-r--r--packages/VpnServices/src/com/android/server/vpn/VpnService.java7
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);