* Makes things simpler for UI state on a wiped account
* Also wipe sync keys from remaining account & inbox
* Unit tests
Bug: 3245274
Bug: 3245779
Change-Id: I74cc6d7859dad54961426b70ffe0541ce49e3b91
* Set aggregated expiration values with DPM
* Fix min/max logic when aggregating, and fix unit test
* Add expiration tests when checking if policies are active
* Add expire-password to uses-policies set
* Handle password refresh (clear notifications and sec. holds)
* Handle password expiration (warning and/or wipe synced data)
* Unit tests for provider-level methods
* Refactor common security notification logic
* Placeholder notification strings (need final)
Bug: 3197935
Change-Id: Idf1975edd81dd7f55729156dc6b1002b7d09841f
- Set "Viewing FILENAME" as title.
- Home icon now has "back" arrow. Closes the activity when clicked.
Bug 3221312
Change-Id: I689499e10704d3c5d206df4aa12e21db9687c4c5
Now non-special mailboxes on mailbox list doesn't have an icon, so
getIcon(Mailbox.TYPE_MAIL) should return null.
Change-Id: I354551baa4027c8e90c499dafac72423343c9cee
* New method in AttachmentProvider to delete all attachments for an
account, and unit test it.
* New method in Controller to delete all synced data for an account,
and unit test it.
* Fixed existing problem with Controller unit tests (needed cache clear)
* Fixed existing problems in Controller (mContext vs. mProviderContext)
Bug: 3197935
Change-Id: I79c6a03c21f18d37eeb8158cd1c2af0e0a6e9d2e
Show color chips for account rows and message items on the combined view.
Moved hard-coded color values to resource.
Bug 3138001
Change-Id: Ib93fb9d6e9592ebd0c297f83c3dee2358a80508f
* Hoist wipe() method from AbstractSyncParser to AbstractSyncAdapter
* Add deleteAccountPIMData(accountId) to the EmailService API
* Implement deleteAccountPIMData for EAS
Change-Id: I1037cde25fc2b24419f399446cfa0906dc0174d1
* Change CounterMap to not extend HashMap
* Renamed remove() to subtract()
* Comment out a failing test
* Add a flag that prevents any objects from being cached
Change-Id: I74754133b505178e8b0166390f69509f006a3da2
* In this CL, we cache individual rows, based on the CONTENT_PROJECTION
defined for the most common queries (Account, HostAuth, Mailbox, and
Message)
* Queries on individual rows (most often Class.restoreClassById()) will
look to the cache first, rather than querying the database
* Queries on smaller projections will build MatrixCursor's from cached
data
* Write-through caching updates the cache with changed columns
* Experiments with live data indicate that > 95% of queries that are
cacheable (single row, no selection) can be retrieved from the cache,
thereby saving a great deal of disk access.
* Timing experiments show that cache hits are > 40x faster than cache
misses
* Unit tests for the various classes exist, with more coming
TODO
----
* More unit tests
Change-Id: I386a948a2f4cc02b6548d07d9b2fefd1e018a262
- Show email address
- Show inbox unread message count
Initially I thought of using a join to get accounts with their unread
counts with one query, but there were enough subtle issues that I gave up
on the idea.
Instead it uses a MatrixCursor to build a completely new cursor,
based on a regular accounts cursor.
Change-Id: I09e8762f131cc2bd3637e1a3d302088a3b5b2479
UI Changes:
- "Move", "Delete" and "Mark as unread" became action bar commands.
- The message view bottom panel now only has "newer" and "older" buttons,
with the current position in the message list. (shown as POS of TOTAL)
- The buttom panel is now shown only on portrait
Non UI changes
- MessageOrderManager now keeps track of the current cursor position
as well as the total message count.
- Fixed the "move_action" string, which was wrongly marked as non-translatable.
Bug 3169454
Change-Id: I599543f9e11000a4ee283d31fbd407b2ab53ac44
Filter out non-incoming messages using a subquery.
(because the message table doen't have the mailbox type.)
I was initially thinking of adding a new content URL for
the message table joined with the mailbox table, but it turned out
to be a bit of pain, so ended up using a subquery.
(one of the problems was that both tables had the "_id" field.)
Bug 3177220
Change-Id: I276efb70db1589835f3ddb8c7da4773e72d8691b
* This happens if an open fails immediately (error message in the
initial banner) followed by a checkSettings.
* The fix is to harden checkSettings to force a clean connection
every time.
Bug: 2170147
Change-Id: If7403bf517477d2b03b21d71caab511fe45e234c
These defaults affect manual setup only. There should be no changes
observed in automatic setup, and no changes observed in EAS setup.
* user $email instead of $user as default login
* guess "imap." or "pop3." for server name
* propagate the incoming server name to the outgoing server name, and
replace "imap.", "pop3." or "pop." with "smtp."
Also, fixed a couple of leftover places where we were trimming
passwords (and should not be, since some people insist on having
spaces in their passwords.)
Bug: 2978634
Change-Id: I9b0e345aa9550b5e1cc29aaa22109f03da61af20
- Don't show combined mailboxes with regular mailboxes in the mailbox list.
- Add "Combined view" to the account selector instead.
- "Combined view" has all the combined mailboxes and accounts.
- Renambed these combined boxes. (e.g. "Combined inbox" -> "Inbox")
- Regular account view still has "Starred" mailbox, but it's actually
"combined" and not per-account.
- Re-order special mailboxes per latest wireframe.
Bug 3138004
Change-Id: I4c5860c6774b10c55ba0ca599373e51105432cf8
* For now, clicking on the notification takes the user to the
Welcome activity, as we don't have final flows for the new
account setup UI
* Need comment on strings; the problem is that notification
text must be rather short if we're to use the standard
notification display. It looks like newer UI will allow
3 lines instead of 2, however.
* Tested w/ IMAP, POP3, EAS, and SMTP
Bug: 2322253
Change-Id: I7ed6fa5599179870cbcdb14af062e956eff37ec5
There're differences between how SMTP and EAS use this callback.
We should eventually unify the behavior, but till then let's not
use sendMailCallback().
Bug 3116377
Change-Id: Ic5ecf16251c11ab2bd2e16e29bd417f1ece67f14
sendKey() doesn't work if the screen is off or locked.
We could probably use a WakeLock and KeyguardLock to force the
screen to be on, but that'd require adding unnecessary permissions
to the email app. (not the test apk)
Bug 1737038
Change-Id: Ic036dc4d12770e82bc5de1133d6dd34cd8465f30
Now deleted drafts are really deleted, rather than getting moved to trash.
Also rewrote the test to avoid creating AsyncTasks on the test thread.
In this case it seems to be running fine, but I've had problems doing this
before.
Bug 3099179
Change-Id: Ice5298bf94312ce764d90aa35c5a6c5262ec5b42
* When any Account is modified, MailService gets a content notification and
runs reconciliation in an AsyncTask. Reconciliation ends up calling the
AccountManager, which also runs asynchronously. The net effect is that,
especially during unit tests, where we create/destroy accounts rapidly,
these calls can "back up", ending in a situation in which the worker pool
for AsyncTask is filled, with a resulting RejectedExecutionException
* We fix this by preventing more than one request for reconciliation to
be queued at a time
* Added a unit test that thrashes the notification handler
Bug: 2937628
Change-Id: Iaf25806efb46831f31704604360df091752d9525
ListView uses the _id column for some operations, including
onSave/RestoreInstanceState, and if the column contains negative values
they don't work as expected. The same assumption seems to be in other places
as well, so let's just avoid using negative IDs.
With this CL we now use two different IDs, one for ListView, which will
never be negative, and the other for us, the actual mailbox ID.
Bug 3049315
Change-Id: I263b4895212b5f8bb80c98acaf5c4eccd0bfef55
- Now we show separate notification for each account
- New notification has sender photo, sender name, and subject
of the latest email
- Added the NotificationController class, which is intended to manage
all notifications besides "new message" eventually.
The framework doesn't seem to be 100% ready, and it's not clear how to
add the 3rd line in the expanded notification at this point. Need to
revisit it later to verify UI details.
Change-Id: I40193ee372cb6b2b7245c1588890f238b2469699
* Check array returned by split("=")
* Add unit tests for this case
* Also add unit tests for quoting removal
Bug: 3040796
Change-Id: I170f3cd483fe35186194edeb0c3142fb0e2e9b75
* Separate/identical fixes for incoming, outgoing, exchange
* Unit tests
* Some protocols will fail anyway (e.g. POP3)
TODO: Some sort of warning (master only - won't backport that)
Bug: 2981433
Change-Id: I82984e5912fc7fcb88e747815d0fe33cb36605e7
Make sure not to cast null into a primitive type.
(i.e. If null isn't expected as a return value, make sure to set a non-null
default value.)
Bug 3032143
Change-Id: I9a344d765c75a66f529ad8d99b00b2b919139f9c