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

Unverified Commit 3c20fb6b authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Auth: Catch exceptions during app sign in

parent 10e72fa0
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -151,7 +151,12 @@ class AuthSignInActivity : AppCompatActivity() {
                openAddAccount()
            } else {
                lifecycleScope.launchWhenStarted {
                    try {
                        signIn(accounts[position])
                    } catch (e: Exception) {
                        Log.w(TAG, e)
                        finishResult(CommonStatusCodes.INTERNAL_ERROR)
                    }
                }
            }
        }
@@ -170,7 +175,12 @@ class AuthSignInActivity : AppCompatActivity() {
            binding.button1.isEnabled = false
            binding.button2.isEnabled = false
            lifecycleScope.launchWhenStarted {
                try {
                    signIn(account)
                } catch (e: Exception) {
                    Log.w(TAG, e)
                    finishResult(CommonStatusCodes.INTERNAL_ERROR)
                }
            }
        }
        setContentView(binding.root)