Go to file
Makoto Onuki fc156033d9 Update screen properly when # of accounts becomes 1 from 2
This happens when
- two accounts are configured
- select account 1
- remove account 1, and account 2 becomes active

In this case we failed to select account 2, and the fragments would keep
thinking account 1 was active.  (So no mailboxes would be shown--beacuse there
was of course no mailboxes for account 1!)

When the account list changes, the account loader (created in loadAccounts())
automatically reloads the account list, and calls updateAccountList().  If
there're still more than 1 account at this point, updateAccountList() updates
the account spinner on the action bar.  This will result in
ActionBarNavigationCallback getting called, which then updates the current
account as expected.

However, if there's only one account left, we hide the spinner and just
set the account name to the action bar title, so
ActionBarNavigationCallback won't get called and the current account
never changes.

In this case we shouldn't rely on ActionBarNavigationCallback but have to
explicitly update the current account.

Bug 3491567

Change-Id: Ia9ba3e1c11248ad5a1ba7e055717c5519d6e4884
2011-02-28 17:44:11 -08:00
assets Remove empty.html, which isn't used any more. 2010-12-22 11:59:31 -08:00
docs auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
images auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
res Adding AppWidget xml flag to make widget resizable 2011-02-28 13:32:37 -08:00
src Update screen properly when # of accounts becomes 1 from 2 2011-02-28 17:44:11 -08:00
tests Email split, part dix 2011-02-25 10:46:16 -08:00
.classpath Initial Contribution 2008-10-21 07:00:00 -07:00
.project Initial Contribution 2008-10-21 07:00:00 -07:00
Android.mk Email split, part dix 2011-02-25 10:46:16 -08:00
AndroidManifest.xml Email split, part dix 2011-02-25 10:46:16 -08:00
CleanSpec.mk Proper cleanstep for email 2011-02-28 15:18:10 +00:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
proguard.flags Email split, part dix 2011-02-25 10:46:16 -08:00
remove-exchange-support.sh remove-exchange-support.sh supports MacOS 2011-01-28 13:39:39 -08:00