- Added Message.NO_MESSAGE
- Renamed PSEUDO_ACCOUNT_ID_NONE to NO_ACCOUNT
- Removed PARENT_KEY_NONE and use NO_MAILBOX instead
- For starters, cleaned up the UI controllers to use them.
Change-Id: I6cfd87ece2fced8e9f7c76d034c4d1dbf9e4db10
- Moved the method to EmailCommon.
- Use *_SELECTION for magic mailboxes
(meaning we now use subqueries for magic mailbox selections, rather than
building the mailbox ID list by ourselves)
Change-Id: I3ebf6af62fd912fea6faea0f75e05fc61c87af3b
Since the notification controller now operates exclusively using database
observers, there's no reason for the exchange service to call the
notifyNewMessages() service API.
Change-Id: Iaa7e2f5eae786162eab23b02b03ce6d1e8a738e9
We will suspend notifications whenever we display the message list for an
account (including "combined inbox"). As soon as the message list is paused,
notifications will be resumed.
Change-Id: I481a0f59ce68f89c32210d862d0267f3f334063b
* This is a serious bug dating back to the first Honeycomb release
* It was possible that a newly created Message could not yet be
committed to the database when the AttachmentDownloadService
tries to download one of that message's attachments.
* ADS, when it sees that the message (apparently) doesn't
exist, deletes the Attachment (it appears to be orphaned)
* The effect is that the user never sees one of the attachments
in a message.
* This bug has been reported externally
* The fix is simply to check for the message's existence before
deciding to delete it (this check will always work properly)
Bug: 4409692
Change-Id: I106ed2fe88d2435ad7a462fced5cb307c2559fd6
The notification controller now observes changes to the account database and
adds or removes message observers as appropriate.
Change-Id: I1670fcfd6ce744030199b86708a6ada55b239a84
We were sort of using observers to maintain the new message notifications.
However, other parts of the code would poke into the notification controller
to set things such as a list of newly added message IDs. Now, we rely
exclusively on db observers to manage notifications.
As a side effect of this, we now set the notification text correctly to be
the most recently _added_ message. This may be different than the most recently
sent message [since there may be a non-negligable delta between when the
message was sent and when it was received].
NOTE this still suffers from an outstanding bug where we continue to get
notifications when the Eamil UX is visible. That and monitoring changes to the
account table will be addressed in future CLs.
Change-Id: I4c68273716cc685574a1ca71e5d634f53fe0d882
* Use EmailProvider to backup/restore into a backup database
* Remove all of the old AccountBackupRestore code
* Get rid of the legacy Account class and all of the Preferences
crap that referenced it
* Remove corresponding tests
Change-Id: I2de75aafdacc87246174303961e58547303f641e
Now attachments are actually stored in an explicit list, instead of
being inferred from the state of the UI. This makes it possible to
switch states and restore attachments, and test.
Change-Id: I8c5f80f17f8c9e78d880ac4a1ac6ae22c2ec0579
If we receive new messages, we may display a notification to the user. If
those same messages are read elsewhere (i.e. via a web client), we will
remove the notification.
Change-Id: Iba09afe01942e0deaac8210fd6f9b315b1c8c93f
* Before the Email/Exchange split, EmailProvider was guaranteed not to return a null
cursor; this is no longer true
* We now throw a new RuntimeException (ProviderUnavailableException) when calling
commonly-used utility methods (e.g. restoreXWithId) and the cursor as returned from
EmailProvider is null (which implies that the provider isn't available).
Change-Id: I152d13bff0129c23586cd570d23c87d69cfce372
* Update sync window options to include "Automatic" and "All"
* Make the default (for new accounts) "Automatic"
Change-Id: Icbc696f55abcfad79e66079ebb414ca50778dcaa
* Replace crazy (and soon to be "full") bit fields stored in an account's
securityFlags with a row in a newly created Policy table (thus, fully
expandable)
* Update code from database version 17 to 18; adds Policy table, a
policyKey row in Account, and a revised trigger that deletes Policy
information for deleted Accounts
* Update old PolicySet unit tests to work against the new Policy class
* Add test for the conversion of securityFlags to Policy
* Tested in a variety of scenarios; appears to be functionally equivalent
Change-Id: I1505ee75230d6a0d3c2b62a46326f39c2c7f9eb5
- "save draft" no longer closes the message
- ensure consistent state if there are successive saves
- misc changes to the way a message is loaded if there is a pending save
Bug: 3072398
Change-Id: I9cd01319772293e4d410020ab27603821a95ec9f
- Now we always use a fragment as a callback, rather than assuming the parent
activity implements it.
- Use a generics trick to make sure the callback fragments really implements
Callback.
(Might be abuse of a language feature, but it's at least safer than runtime
check...)
Bug 4314669
Bug 4345496
Change-Id: If4048d456b298784097e202cffab170177ac7b2d
not making any real code changes:
* removed deprecated, unused methods
* remove 'throws' clauses when that exception is never thrown
* renamed method Controller#moveMessage()-->moveMessages()
Change-Id: Ifd006f760f0c19283e94a11a45c71295c8da35f7
With the recent changes to hierarchical folders, the move-to dialog is
quite unusable if you have multiple child folders with the same name.
While waiting for UX to decide on the exact display, make a few quick
changes to display the fully-qualified pathname instead of just the
child folder name.
Change-Id: Id5c1cc98364fbf7a82a05ac30e944507c7d16320
We now create folder hierarcies for IMAP. This also includes a nifty SQL
statement that will get your existing database into shape.
Change-Id: If07a0632e9b250cf0c33c3e16bfba5816beab94c
The logic is simplified by creating database rows for new mailboxes down
in Imapstore. This means that the difference between local and remote folder
lists are mailboxes that need to be deleted.
Note -- this is still not the final CL. We probably update the database too
frequently and the column values aren't updated to support nested folders.
Change-Id: Ifbe4e0cf74ba81e5b6156b452ab72c56c35235ab
There's no need to create a URI just to rip in appart again. Additionally, to
support additional changes (i.e. to use Mailbox instead of Folder in the
MessageController), we need to store the actual Account.
NOTE -- This change only affects IMAP and POP3. SMTP will come in a follow-on CL
Change-Id: I400036a17271c99272fd9c603547dcd713b50b9d
ListStateSaver did nothing more than hold a Parcelable, and was a
Parcelable itself. The abstraction may have been useful at some point,
but that time seems to have passed.
Change-Id: I2f1f45828782ab44aa8935aa50b825e07845a2a5
- adds a compile time dependency to the guava library
- changes to use @VisibleForTesting in places to ensure it works
Change-Id: I2c5c4f9861234fec3613da011185e5c11f228466