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