Currently the internal and external Intent extra mechanism both use the key account. This leads to AccountIdIntentSerializer always returning a LegacyAccount in the case where a third-party app uses the documented way to open a specific account (see https://manual.davx5.com/integration.html#open-davx5-for-a-specific-account). However, if the given Android account is linked to a database account we need to use a DbAccountId instance internally.
To fix this we should…
Note: Since this lookup in AndroidAccountManager involves a database access and we don't want to do this in the main thread, we either need to defer showing AccountScreen until the AccountId is available or change AccountScreen to support a loading state.
Currently the internal and external Intent extra mechanism both use the key
account. This leads toAccountIdIntentSerializeralways returning aLegacyAccountin the case where a third-party app uses the documented way to open a specific account (see https://manual.davx5.com/integration.html#open-davx5-for-a-specific-account). However, if the given Android account is linked to a database account we need to use aDbAccountIdinstance internally.To fix this we should…
accountId(instead ofaccount),AndroidAccountManagerto retrieve the properAccountIdassociated with the given Android account when handling third-party intents (accountextra).Note: Since this lookup in
AndroidAccountManagerinvolves a database access and we don't want to do this in the main thread, we either need to defer showingAccountScreenuntil theAccountIdis available or changeAccountScreento support a loading state.