Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 993b1c94 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

refactor: remove useless callback

parent 29335d53
Loading
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -59,27 +59,13 @@ class ReLoginWithOidcActivity : AppCompatActivity() {
                null,
                null,
                this,
                { future -> startAddAccountActivity(future) },
                null,
                null
            )
        } catch (exception: Exception) {
            Logger.log.warning("${exception.javaClass}: can't add account: ${exception.message}")
        }
    }

    private fun startAddAccountActivity(future: AliasFuture) {
        val result = future.result?: run {
            Logger.log.warning("Can't add new account: future.result is null")
            finish()
            return
        }

        val accountName = result.getString(KEY_ACCOUNT_NAME)
        val accountType = result.getString(AccountManager.KEY_ACCOUNT_TYPE, "invalidAccountType")

        if (accountName != null) {
            Logger.log.info("($accountType) account added: $accountName")
        }
        finish()
    }
}