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() {
|
||||
LocalKeyStore localKeyStore = LocalKeyStore.getInstance();
|
||||
|
||||
Uri uri = Uri.parse(getStoreUri());
|
||||
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
||||
uri = Uri.parse(getTransportUri());
|
||||
localKeyStore.deleteCertificate(uri.getHost(), uri.getPort());
|
||||
String storeUri = getStoreUri();
|
||||
if (storeUri != null) {
|
||||
Uri uri = Uri.parse(storeUri);
|
||||
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