mirror of
https://github.com/etesync/android
synced 2025-01-11 08:10:58 +00:00
Catch IllegalStateExceptions in the account changed receiver.
These are bad, and shouldn't happen, but ignoring them is not the end of the world, especially since I plan on overhauling this code very soon (probably remove). So for now, we'll just ignore them.
This commit is contained in:
parent
62beaf7083
commit
c27a8b44ac
@ -22,7 +22,11 @@ class AccountsChangedReceiver : BroadcastReceiver() {
|
||||
if (AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION == intent.action) {
|
||||
val serviceIntent = Intent(context, AccountUpdateService::class.java)
|
||||
serviceIntent.action = AccountUpdateService.ACTION_ACCOUNTS_UPDATED
|
||||
context.startService(serviceIntent)
|
||||
try {
|
||||
context.startService(serviceIntent)
|
||||
} catch (e: IllegalStateException) {
|
||||
App.log.warning("Got an illegal state exception! Ignoring...")
|
||||
}
|
||||
|
||||
for (listener in listeners)
|
||||
listener.onAccountsUpdated(null)
|
||||
|
Loading…
Reference in New Issue
Block a user