We found a case where messages in outbox have flagLoaded=FLAG_LOADED_UNLOADED,
where it should be FLAG_LOADED_COMPLETE. Haven't found the root problem, but
remove the flagLoaded test to mitigate the problem.
Also moved the buildMailboxIdSelection call to a worker thread.
(this method issues some queries.)
Bug 2984285
Change-Id: I2a5be300fb3da703698512262cc38bea75d0f7ba
- Added "quick contact badge" to MessageView
- Removed PresenceUpdater, and added new implementation based
on Loader, which is much simpler.
- Changed some text color, so they're visible now.
Bug 2988625
Change-Id: I688a3217178ee8fd0b7245c0ab36a633687ea525
* android.security is hidden. Use java.security.MessageDigest instead.
* Remove android-common from makefile (we no longer use it)
* Add LOCAL_SDK_VERSION to makefile and comment it out
Change-Id: I7f9a021387d5c4e47ade1adb0bb75bec82ba0dd8
Some of these broke in 8bcb572ccf
which changed the [Next] button to an ActionBar menu item.
However, the entirety of AccountSettingsXLTests needed to be disabled
because the PreferenceActivity is very different on phone or XL sized
devices, and the tests infrastructure will need to be refactored to deal
with that (on another day.)
Change-Id: I9adbfc9b8da6179e4c4e82d29bb872ee05619a41
* Add 'snippet' column in Message table and handle upgrades to the
new schema
* Generate a snippet from either HTML or plain-text message body,
removing tags, extraneous whitespace, and other superfluous text
along the way. Store the snippet in the Message table
* Clean up MessagesAdapter to use the pre-existing list projection
and constants
* Write unit tests for snippet creation
* The UI in this CL is always single-line, ellipsized
TODO: Handle two-line subject if portrait and XL
Change-Id: I84a2cbe10957975942edad6eb1255a726924a78a
* UI is still temporary
* In this version, we check if the selected messages can be moved *after*
you click "Move", rather than disabling the button beforehand.
Change-Id: Ief2864d2a513001847844963b2b0cb6b714e8667
* Turns out that we weren't handling one of the cases for YEARLY
RRULE; that in which the date is specified as a day of week plus
week of month
* Also, we weren't always sending the INTERVAL properly in a few
cases
* Fix these issues and add a unit test that confirms the fixes
* Also removed an unused argument in recurrenceParser in
CalendarSyncAdapter
Bug: 2718948
Change-Id: If9146d484218e7d6bd9f5c2305d0e6a216aeed49
* Finish implementation of AccountSettingsXL.actionSettings()
* Point account manager entry point at it now
* Remove old AccountSettings activity
* Move AccountSettingsTests over to AccountSettingsXLTests and minor
cleanups so it works in fragmentized activity.
Change-Id: I5f979a3a9a29dcbbe5a63833b184e6c0313652d5
* Now it'll refresh mailbox list (left pane) as well.
(With the minimal interval of 30 seconds)
* Always refresh inbox.
(also with the minimal interval of 10 seconds)
* Also make sure the "auto-refresh" won't refresh
non-refreshable mailboxes. (drafts, etc)
Bug 2929889
Bug 2930018
Change-Id: I09452d40aad6008a721cfbc3f491617224d7048f
There were two cases where MailboxFinder responded to updateMailboxListCallback
when it shoulnd't.
- Callbacks for non-target accounts
- Callbacks arrived after the operation is finished
Make sure these callbacks are properly ignored.
Also, make sure startLookup() can't be called more than once.
Change-Id: I823c11ab5f96df4eb84594c08d3325d12319f708
* EAS can send both "simple password" and a non-zero number of
required complex characters; we're supposed to ignore the
complex character requirement in this case
* Force complex characters to zero if password is "simple"
* Update constructor test to check the fix
Bug: 2903349
Change-Id: I3d42bd3c8f3667d8f3027da9e91e0dd18722d9bf
* Clean up Controller.deleteMessage to work with new EmailContent
utility methods, and move out of the UI thread
* Add unit test for Controller.moveMessage
Change-Id: Ic49e2ecc7ef2252dd4d51f4c3b313b936fda78b6
* We can't run the AccountManager functionality of account backup
and restore in the unit tests, because IsolatedContext doesn't
mock the AccountManager; this leads to various NPE's when the
test is run
* These problems started, by the way, when we added POP/IMAP
account integration with AccountManager
* Since the AccountManager side of account backup/restore isn't
tested, we'll skip that part of the process when running unit
tests
Bug: 2873546
Change-Id: I94673913e66722ac70f3c49c51465122e98bf3d9
isEasAccount now uses getProtocol(), so it works even if the hostauth
hasn't been restored yet.
Bug 2929896
Change-Id: Iee902c18ef59680d8a7d4622230489ec7946f38c
Some of the tests run code on the UI thread but check the result
on the test thread, without synchronization, which is wrong.
Mark the fields volatile to fix it.
Change-Id: I917493f10fc9a15da57cfbc1e65e8d8e2cffd850
* Changed our queue from a TreeMap to a TreeSet that uses an easily
testable comparator
* Remove the ugly bit twiddling priority computation
* Test DownloadSet (the logic behind queue ordering, addition,
removal, query, etc.)
Change-Id: Ia8427900b8f39a243a5407349775802d0a4fad4f
The problem is that this test creates a partial account which will be
used by the activity, but the account is picked up by MailService too
(which is probably not intentional), which crashes because the account
is not properly constructed. (empty address)
Bug 2938323
Change-Id: Ie9ba19ebf72431d086014c1dc191a0c71769dea4
Fixed the bug where callbacks for sendPendingMessagesForAllAccounts
are called on a worker threaed.
Change-Id: I28f1424cf67e15abf37c09b68050d1385f9ac3ee
Added RefreshManager, which is responsible for getting refresh requests
from UI and keeping track of what is being refreshed.
Conceptually it's a part of Controller, but extracted for easier testing.
- Now sendPendingMessagesForAllAccounts() is owned by RefreshManager
rather than Controller.
- Also updateMailboxRefreshTime/mailboxRequiresRefresh have been moved
in from the Email class.
- Now MessagingException implements a method to return an error message
for the UI.
The refresh button on 2-pane doesn't work as intended yet, because the
spec is a bit too complicated (as described in the TODO in
MessageListXLFragmentManager.onRefhres()).
This change touches many file mostly because it cleans up a lot
of code duplication.
Change-Id: I058ab745ccff10f6e574f6ec4569c84ac4a3e10e
Some tests create mock controllers. They register themselves to
MessagingController when instantiated, but never unregister.
Added a cleanup method, and call it for each instance.
(I was hoping it would spped up unit tests, but it didn't. Still
it's a nice thing to do.)
Change-Id: Ia90f0380aef388d22f7cfcf6e9203e05444b3285
- Now MessageListFragment uses loaders to load data.
- Now that we use Loader's auto-requery with throttling,
removed the throttling timer from MessagesAdapter.
- Simplified footer mode. (now only "no footer" or "load more")
- Removed saving/restoring list state code.
These method don't really look like working, or at least
not always working. Now that UI's lifecycle is changing,
we'd better redo it from scratch.
- Removed MessageListUnitTests.
It only has tests for onSaveInstanceState/restore of the fragment,
which I virtually disabled.
And minor clean-ups
- Moved the code to save/restore selected state from the fragment
to Adapter.
Bug 2911766
Bug 2897500
Change-Id: I16c7aefecc5409c57fc5fc8c59b5c80d9b7fc164
Apparently IMAP servers may return multiple SEARCH responses for a
single SEARCH command, and we need to handle all of them.
Before the IMAP rework there was 3 methods that issued the SEARCH command.
Two of them ware doing it right, but the other wasn't, which was what
I copied from, unfortunately!
In case you're wondering, originally the test for this method was done through
upper methods, e.g. getMessage().
Bug 2911647
Change-Id: Ia50072944d5b01c1e59541c3a966067b13910cc4
- mConnection.destroyResponses() should be protected with
if (mConnection != null).
When we get an IOException, we close the connection and null it out in
ioExceptionHandler(). So mConnection can be null at any point after
where ioExceptionHandler() first appears.
- ioExceptionHandler should close its parent ImapFolder only if the argument
connection is mConnection.
Methods like exists() may pass an ImapConnection which is not mConnection
to ioExceptionHandler. In which case we don't have to close the ImapFolder.
Bug 2898211
Change-Id: I8f9f45d91f596bb8da1a1575593e652d66deb643
Fix for crashes caused by an incomplete account
which typically a crashed unit test leaves behind.
- "Delete account" now works for incomplete accounts
- AccountBackupRestore won't crash.
Change-Id: Ie235aa15cf9b970fd184c60f14406aa7353c6f00
This is phase 1, which simply replaces the phone UX with a fragment-based
equivalent. A subsequent CL will convert it to a large-format multi-pane
version.
Also fix a latent bug in the signatures of the Incoming & Outgoing
settings, both in the reflection code and in the proguard flags.
Change-Id: I86e857af8b9573c0d6070bb21053ce65bb7fe8a0