TBA: Delete AccountManager usage from Tabs
When the app is started/restarted, it creates an OnAccountsUpdatedListener
using the Android AccountManager
in Tabs.attachToContext()
. When a new account is added, the Listener calls queuePersistAllTabs()
where the current tabs are cached in the local database on disk. We should avoid all of this. We already deleted most of the FxA and Sync related code, we can probably delete this, too.
mAccountManager = AccountManager.get(appContext);
mAccountListener = new OnAccountsUpdateListener() {
@Override
public void onAccountsUpdated(Account[] accounts) {
queuePersistAllTabs();
}
};
// The listener will run on the background thread (see 2nd argument).
mAccountManager.addOnAccountsUpdatedListener(mAccountListener, ThreadUtils.getBackgroundHandler(), false);