mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Make deleteCertificate null-safe
This commit is contained in:
parent
833d9c5de8
commit
4808406739
@ -1894,9 +1894,15 @@ public class Account implements BaseAccount, StoreConfig {
|
|||||||
public void deleteCertificates() {
|
public void deleteCertificates() {
|
||||||
LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
|
LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
|
||||||
|
|
||||||
Uri uri = Uri.parse(getStoreUri());
|
String storeUri = getStoreUri();
|
||||||
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
if (storeUri != null) {
|
||||||
uri = Uri.parse(getTransportUri());
|
Uri uri = Uri.parse(storeUri);
|
||||||
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
||||||
|
}
|
||||||
|
String transportUri = getTransportUri();
|
||||||
|
if (transportUri != null) {
|
||||||
|
Uri uri = Uri.parse(transportUri);
|
||||||
|
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user