Fix error wrongly shown during SSO connection
This commit is contained in:
parent
3e83f3d07d
commit
f328fcc13f
@ -55,7 +55,6 @@ class SSOAccountFactory : AccountFactory {
|
|||||||
data: Intent?,
|
data: Intent?,
|
||||||
block: (success: Boolean) -> Unit
|
block: (success: Boolean) -> Unit
|
||||||
) {
|
) {
|
||||||
var success = false
|
|
||||||
try {
|
try {
|
||||||
AccountImporter.onActivityResult(
|
AccountImporter.onActivityResult(
|
||||||
requestCode,
|
requestCode,
|
||||||
@ -64,10 +63,11 @@ class SSOAccountFactory : AccountFactory {
|
|||||||
activity
|
activity
|
||||||
) { account ->
|
) { account ->
|
||||||
SingleAccountHelper.commitCurrentAccount(activity.applicationContext, account.name)
|
SingleAccountHelper.commitCurrentAccount(activity.applicationContext, account.name)
|
||||||
success = true
|
block(true)
|
||||||
}
|
}
|
||||||
} catch (_: AccountImportCancelledException) {}
|
} catch (_: Exception) {
|
||||||
block(success)
|
block(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getAccount(context: Context): Any? {
|
override fun getAccount(context: Context): Any? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user