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?,
|
||||
block: (success: Boolean) -> Unit
|
||||
) {
|
||||
var success = false
|
||||
try {
|
||||
AccountImporter.onActivityResult(
|
||||
requestCode,
|
||||
|
@ -64,10 +63,11 @@ class SSOAccountFactory : AccountFactory {
|
|||
activity
|
||||
) { account ->
|
||||
SingleAccountHelper.commitCurrentAccount(activity.applicationContext, account.name)
|
||||
success = true
|
||||
block(true)
|
||||
}
|
||||
} catch (_: AccountImportCancelledException) {}
|
||||
block(success)
|
||||
} catch (_: Exception) {
|
||||
block(false)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getAccount(context: Context): Any? {
|
||||
|
|
Loading…
Reference in New Issue