Only show "add connection" button if relevant
- We don't want to present the user with the "add connection" button if the user doesn't use the account that provides the service - Check if app contributing the account type is disabled or not - Check if there is an activity to handle the "add connection" intent - Check if there are raw contacts in the database with that account type - Store this in a cache, and refresh it after a certain period of time (i.e. 1 second) using an AsyncTask. This is to prevent computing the list each time the contact is loaded (which can happen many times especially when looking at a detail page during a sync). - Make sure public AccountTypeManager methods first check ensureAccountsLoaded() Bug: 5398529 Change-Id: I004f9562a587035a3168aaddb6eb43710fd201e6
Loading
Please register or sign in to comment