1
0
mirror of https://github.com/etesync/android synced 2025-03-28 05:15:43 +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?
get() {
val uri = accountManager.getUserData(account, KEY_URI)
if (uri == null) {
return null
}
try {
return URI(accountManager.getUserData(account, KEY_URI))
return URI(uri)
} catch (e: URISyntaxException) {
return null
}