resolve merge conflicts of cb1968148a to master

Test: make RunSettingsRoboTests
Change-Id: I436af9f0415b9ad7ea0ea53f4f68d337fdbaa0aa
This commit is contained in:
Robin Lee
2017-01-19 23:58:20 +00:00
4 changed files with 34 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ import android.widget.Toast;
import com.android.internal.widget.LockPatternUtils;
import com.android.org.bouncycastle.asn1.ASN1InputStream;
import com.android.org.bouncycastle.asn1.pkcs.PrivateKeyInfo;
import com.android.settings.vpn2.VpnUtils;
import sun.security.util.ObjectIdentifier;
import sun.security.x509.AlgorithmId;
@@ -361,6 +362,7 @@ public final class CredentialStorage extends Activity {
if (success) {
Toast.makeText(CredentialStorage.this,
R.string.credentials_erased, Toast.LENGTH_SHORT).show();
clearLegacyVpnIfEstablished();
} else {
Toast.makeText(CredentialStorage.this,
R.string.credentials_not_erased, Toast.LENGTH_SHORT).show();
@@ -369,6 +371,14 @@ public final class CredentialStorage extends Activity {
}
}
private void clearLegacyVpnIfEstablished() {
boolean isDone = VpnUtils.disconnectLegacyVpn(getApplicationContext());
if (isDone) {
Toast.makeText(CredentialStorage.this, R.string.vpn_disconnected,
Toast.LENGTH_SHORT).show();
}
}
/**
* Prompt for key guard configuration confirmation.
*/