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:
parent
ea0f974086
commit
85fd9fdd7c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user