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
Original CL comment:
Always set a delete policy for legacy accounts
The delete policy can only be set for POP3 accounts. However, the delete
policy is used for all legacy accounts (that includes IMAP). As such, we
need to make sure IMAP accounts also have their policy set; even though
the setting is not configurable by the user.
The delete policy does not mean anything for Exchange accounts, so, we do
not need to modify the account setup code for them.
bug 3074164
Original Change-Id: Iab10d2997404b3b0c10a60a64fb652540c0d2d1a
Change-Id: Idc290aa1b8ff4f17a0c8fd57333523becef0c8e5
Removed the ugly doAutoRefresh() and byExplicitUserAction.
The intention for these was to supress auto-refresh when the message list
opens without any explicit user action, e.g. due to screen rotation.
However, now that we have the RefreshManager.isMailboxStale check with 5
minutes duration, this check is not really necessary. Let's just always
refresh mailbox if it's stale.
Bug 3493134
Change-Id: I6d0365ed7f8092304117d5f619d570b828edf76f
* The coup de grâce for Exchange in Email
* Remove Exchange bits from AndroidManifest
* Update Android.mk to create static jar for emailcommon
* Delete all com.android.exchange files
* Delete all exchange-only strings
* Change loadAttachment service method to take only attachment id and
background flag
* Add code to AttachmentProvider.openFile() that opens an output file
for attachment writes
* Make sure deviceId is determined in Email app (not Exchange)
Bug: 3442973
Change-Id: I775600252fd121f474d51cb26fefbfcc50e387af
If the setup activity ever needs to restore itself after being killed, we were
restoring the Activity object's state (i.e. rebuilding the UI) before we
restored the state of our class. Since the Activity necessarily depends upon
our object's state, Bad Things can [and will] happen.
The solution is simple -- save our object's state last, but, restore our state
first.
bug 3476039
Change-Id: I623f1938c2e0f50d660708a7a7ac3eeb4a8f9090
In some cases, the de-bounce flags were not being properly cleared. Namely, on
the outgoing settings screen. We now consistently clear the flags to ensure the
"next" button is always actionalble when it should be.
bug 3425395
Change-Id: Ib8085fb96522158198d9f33a12effef8f65c0d19
The progress bar is not meant to be GONE. Encapsulated the progress view
in MessageViewAttachmentInfo to make sure that won't happen.
Bug 3417034
Change-Id: I1efee089cc7921f4428a38fcbcdc2e8aa3cec9fd
We're using the mock context to prevent modifying the real databases. However,
we need the real context to create intents. Use the real context in the few
places we must use it.
Change-Id: Icb8d289239218921c0b4b5c93ac7983830d90394
- Extracted the loader
- Extracted ViewType and introduced WidgetView.
WidgetView is ViewType + mutable fields, such as account id.
WidgetView now owns the method to switch views.
These two are basically in preparation to address the message count bug.
(we're showing total message count where it should be the unread count,
which is a bit tricky because it'll require two different queries.)
- Also simplified the threading model in EmailWidget to fix potential
theading issues. (now (almost) everything works on the UI thread)
Bug 3431240
Change-Id: I9f8a268210995f1135baabe88b49b274272708d4
The expanded account spinner is completed, but the collapsed view
needs some more work. (That'll probably be a rather large CL, so I'll
finish it in a separate CL.)
Bug 3434135
Change-Id: Ia732e6b57b8c0d3e1609c3134b26411539ab6a18
This will be used to set the max width to the account name spinner.
I gave up on writing tests for onMeasure. It wasn't easy without adding
a dummy activity and layout.
It'll be used for a fix to bug 3439694.
Change-Id: Ie7569b0661eb732e270e4521fa0d3306f1bdd12c
The delete policy can only be set for POP3 accounts. However, the delete policy
is used for all legacy accounts (that includes IMAP). As such, we need to make
sure IMAP accounts also have their policy set; even though the setting is not
configurable by the user.
The delete policy does not mean anything for Exchange accounts, so, we do not
need to modify the account setup code for them.
bug 3074164
Change-Id: Iab10d2997404b3b0c10a60a64fb652540c0d2d1a
Without this, there's a small window where a fragment is in a valid
state after openXxx() before the list is loaded.
Bug 3420361
Change-Id: I7f84a94dec1419762aa6b24188c023abe974d2bf
Whenever we remove the "load" and "view" buttons, we should add an "info"
button; where we will inform the user as to why we are preventing her from
seeing the attachment.
bug 3338997
Change-Id: Ic243f1542dec55f5b256eeb67ade50aa90e42009
* When security settings notification is clicked, inform user that
they need to change settings (before dumping them in security
settings.)
* On an authentication failure, present a dialog to the user explaining
that the username or password may be incorrect.
* When the device pin/password is expiring or expired, present a dialog
to the user explaining that it needs to be updated.
Bug: 3238657
Change-Id: I8fca446fa3c1bf87a95938553dbdc362c3df220e
Editing the account description occurs in a different fragment. As such, we
need to notify the fragment in charge of the account list whenever the
description is updated.
We already have a callback mechanism, so, expand that to send notifications
of any property change.
bug 3388586
Change-Id: I02475233f7f333db57c49ceaf908dbfa69c86ca6
if you create an account using one of the pre-defined templates (such as
Yahoo!), the user name and password were not being set in the HostAuth
structure. This was causing an NPE when we tried to generate an IMAP ID.
Change-Id: I9619cddc0ab758c187cf4b9c7c84485ac1f4bfdd