1
0
mirror of https://github.com/etesync/android synced 2025-06-26 09:52:38 +00:00

AccountSettings: fix issue when saved uri is null.

This commit is contained in:
Tom Hacohen 2020-08-26 10:13:56 +03:00
parent ea0f974086
commit 85fd9fdd7c

View File

@ -36,8 +36,12 @@ constructor(internal val context: Context, internal val account: Account) {
var uri: URI? var uri: URI?
get() { get() {
val uri = accountManager.getUserData(account, KEY_URI)
if (uri == null) {
return null
}
try { try {
return URI(accountManager.getUserData(account, KEY_URI)) return URI(uri)
} catch (e: URISyntaxException) { } catch (e: URISyntaxException) {
return null return null
} }