History log of /packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
89b8fdca1841efd832e05cee877ab3eaf3780aae 17-Dec-2013 Jerry Xie <jjx@google.com> Disable, suppress, remove broken and obsolete Email tests

Change-Id: Ia4dcba1c6966f23dd2a15e69324b7345aed8f944
(cherry picked from commit 7037a0bd3d8e925a9115f475f5c0d05ddae2eeee)
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
515d830e8755d3674e04bcc60d7f85b4fa7fb202 27-Nov-2013 Jerry Xie <jjx@google.com> Get Email units to compile

Change-Id: I171a0e2421c5006d9862ad94f886932146547020
(cherry picked from commit 17d3a29c9d8f7a27c463239f190bdcc4e0804527)
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
cb1d65c47825dc7a45c7954cd93669296b35305e 26-Jul-2011 Ben Komalo <benkomalo@google.com> Fix mailbox finding and unit tests.

We seemed to not properly fallback to querying the database if the cache
did not contain a mailbox of a specific type. We may want to consider
caching mailboxes related to PIM data, but for now this is a quick fix.

Also fixes unit tests.

Bug: 5019661
Change-Id: Idcac0a6f15aa7f174890ae586f478fbb8f6e05b7
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
244d306ebb0addbc5d87008af9412b76c80e861e 29-Jun-2011 Marc Blank <mblank@google.com> Remove more useless code

* Strike another blow for sanity!

Change-Id: Id95b441f9577abda66f04113793d6b1c60500ebe
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
77160c8c08df90c8e9992596197e3438e46d41e5 29-Jun-2011 Marc Blank <mblank@google.com> Merge "Don't cache ImapFolders"
2720a818d5de169734434b114adfdf824a485f55 29-Jun-2011 Marc Blank <mblank@google.com> Don't cache ImapFolders

* ImapFolder is currently very unsafe for use by multiple threads,
causing, among other things, the referenced bug
* Since ImapFolder is very lightweight, there's no particularly good
reason to be caching them anyway
* Rename isOpenForTest to isOpen

Bug: 4972084
Change-Id: I2bf17b9cfc8549a222e991f3e59abfd00a4d3afd
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
35b0e95ca795e17b6dc8dd98c7ab847d65d9aa0c 29-Jun-2011 Marc Blank <mblank@google.com> Clean up Store implementation

* Remove unused argument from newInstance/constructor
* Create ServiceStore class, the superclass of ExchangeStore (and,
eventually, all Stores, until they can go away completely)

Change-Id: Ic5237236c5349ecf006538c58b63c1efe8e4ea61
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
627bc6ed57ee06cc588e64ff959bfd7870b659b6 13-Jun-2011 Marc Blank <mblank@google.com> First implementation of IMAP search

* Broke up synchronizeMailboxGeneric into three pieces; it's still
horrible, but this at least stops my eyes from bleeding
* Remove unused method/tests from Folder interface

Change-Id: Ib4d979536be657137cf70ca535cf429d707be41b
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
f5418f1f93b02e7fab9f15eb201800b65510998e 14-Jun-2011 Marc Blank <mblank@google.com> Move Account into its own top-level class

Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
12b82d9374947c9268217f45befe8a74bd9b60d7 20-May-2011 Ben Komalo <benkomalo@google.com> Move HostAuth to top level class.

No other changes made.

Change-Id: I1c6497c98abc0f99443ea42d8aed6295b263c123
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
171c3f2273223652b9999977d530a715420c0f64 16-May-2011 Todd Kennedy <toddke@google.com> Some more re-arrangement of code

No real code changes; just moving where code / constants live. Removed
one unused method of Store.

Change-Id: Ie7532381759a568cb23601e1071c8e199b6beb07
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
e87ff6c3cbbfc5e3636f9827b58820652e3ea1c5 27-Apr-2011 Todd Kennedy <toddke@google.com> Opportunistic cleanup

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
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
200c6bd9fa19b78acc2c1664f858521aa9885353 21-Apr-2011 Todd Kennedy <toddke@google.com> Simplify mailbox synchronization logic

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
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
a50fc99b0c433f0cde31ba1c7ab87fb9ea86345d 19-Apr-2011 Todd Kennedy <toddke@google.com> Use Account instead of URI to create transports

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
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
31d9acbf0623872f9d4a2b3210b5970854b654c7 12-Feb-2011 Marc Blank <mblank@google.com> Email split, part huit: Refactor constants, clean emailcommon

* There are three pieces to this CL (sorry):
1) Move and/or rename some constants into emailcommon
2) Move Utility to emailcommon, moving the few UI
related utilities back into Email (FolderProperties
and UiUtilities)
3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
32311cce0153fbb2708d871626a0797cc93b7e4e 10-Feb-2011 Todd Kennedy <toddke@google.com> Implement IMAP prefix support

We support two different ways for an IMAP prefix to be specified:
1. A text field on the IMAP configuration page. This is the most obvious to
the end user. It is also an explicit, manual configuration.
2. RFC2342 defines a NAMESPACE IMAP command to be able to query the prefix
from the IMAP server. This is an automatic configuration without any
user involvement (i.e. the UI will NOT change if a prefix is loaded in
this way)

If the user goes to the trouble of specifying a prefix, we will always honour
it instead of the namespace returned by the IMAP server -- even if the user's
configuration is wrong.

bug 1592696

Change-Id: I6b94c7aaac538f6cd9dc4694b0f1634e8c956bc1
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
2193962ca2b3157e79f731736afa2a0c972e778a 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part quatre: Move along, nothing to see here

* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
54ab7a27a3756a241ba06f0762969cf5a338bf60 05-Nov-2010 Andy Stadler <stadler@android.com> Fix NPE in pop3 checkcapabilities

* 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
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
0a8030562a5235591a5f5364bf5e6855ffa62861 17-May-2010 Makoto Onuki <omakoto@google.com> Fix flaky tests

Follow up to I3bf7d340. Make sure temp directory is set before running tests.

Turned out Application.onCreate doesn't seem to be guaranteed to be run
before unit tests.

Without this, some tests may fail saying: "TempDirectory not set.
Application hasn't started??", if onCreate runs too late.

Change-Id: Ic5aee939a2c21f9579a643d0729dd0e9ba81022e
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
9c9e757917b51cb87c1880b8e8ae14bfed5d84f9 14-May-2010 Makoto Onuki <omakoto@google.com> Add static method to get temp dir in Email.

I need to be able to get the temp dir from anywhere without Context
for the new IMAP parser.

Change-Id: I3bf7d34059399a8253c0760ebc392804ea434412
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
645fc2830118e19e604f24ba7ffe71c775631f64 12-Apr-2010 Andrew Stadler <stadler@android.com> Try TOP even on POP servers that fail to report CAPA

* Ignore the results of CAPA and always try TOP
* If TOP returns -ERR simply fall back to (bad old slow) RETR
* Unit tests for positive & failure cases

Bug: 2588432
Change-Id: Ife4b551217de1025e14efc46074f16ef4ae99c6f
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
e4a7cc440f081ef9c4375a2bd2f82680cc11b152 30-Sep-2009 Andrew Stadler <stadler@android.com> Re-enable modernized version of "optional" SSL/TLS

* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
some unsigned certificates, but was *also* allowing TLS to
optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)

Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.

Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
c41c47fa07a22f8a7612fb0191f152a36d95b7a5 25-Sep-2009 Andrew Stadler <stadler@android.com> Enable message upload

* Create logic to detect upsyncable messages in Sent
* Note: Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support

Bug # 2097471

TODO (next CL): Upload attachments records too

Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
092d35c98d00c5a8b1ba93f51f8e59220f1488cb 16-Sep-2009 Andrew Stadler <stadler@android.com> Fix NumberFormatException in POP3 message sync

* Write unit test to replicate failure(s) in POP3 use of parseInt. All
calls to parseInt must be guarded by try/catch NumberFormatException.
* Fix the failures

Bug # 2115586
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
4f23ebd3dcca596533a33e6faedb446a814d32e3 25-Jun-2009 Takaoka G. Tadashi <takaoka@google.com> Fixed Pop3Store to be able to delete message in Inbox.

When delete policy is DELETE_POLICY_ON_DELETE, PENDING_COMMAND_TRASH
will be invoked. But in POP3 account, because of 1) Inbox is
OpenMode.READ_ONLY, 2) getMessage(uid) just after open() is not work
correctly, 3) remote Inbox folder is not closed after deleting message,
PENDING_COMMAND_TRASH does not work. And also the fat that some POP3
server use UID with '-' prevents PENDING_COMMAND_TRASH to recognize
the message is remote message.

Internal Bug: 1651709
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
b011a812e05902d7e417b8c47acc90a592f4b412 22-May-2009 Andrew Stadler <stadler@android.com> Fix the java.lang.StringIndexOutOfBoundsException that occurs when an SMTP server closes the connection early or returns an empty line.
Fix the same error in the Pop3 UIDL parser.
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
c9f151d4fe47c5d426109822a7042ae8bbeb0a06 02-May-2009 Andy Stadler <nobody@android.com> AI 148230: Allow stores to indicate if they support server-side copying of sent
mail into the "Sent" folder, thus eliminating the need to perform a 2nd
upload into the server's Sent folder. IMAP and POP3 do not support
this (although IMAP could when it recognizes Gmail IMAP servers.)
BUG=1807499

Automated import of CL 148230
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
5551f7feb210313aaf3e5a33cdaec5f991ba3288 24-Apr-2009 Andy Stadler <> AI 147714: New, lighter-weight version of CL 147620. Still touches as many files,
due to API change, but still has a smaller footprint. Also fixes the
bug in the original, which is that we actually needed to udpate the
local trash folder, not the remote one.
BUG=1807499

Automated import of CL 147714
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
b633efa2b7386b814ff5b9cd05af4c1c8a905fb7 24-Apr-2009 Andy Stadler <> AI 147708: Automated g4 rollback of changelist 147620.
*** Reason for rollback ***
We figured out a simpler solution affecting fewer files - we
don't actually need the new remotestore API.
*** Original change description ***
Some stores require changing the UID of a message when it is
copied to a new folder (I'm looking at you, EAS). Add a callback
to Folder.copyMessages() which allows the store to report back
such changes. Then, add a new api to record the new values:
Folder.updateMessages().
For now, the two APIs are linked by a common callsite in
MessagingController, so the existing stores can use a minimal
implementation - if they don't call the callback, nobody will
call the update.
BUG=1807499

Automated import of CL 147708
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
1df530294d37573e1b1a97bc1c01a43af3127224 24-Apr-2009 Andy Stadler <> AI 147620: Some stores require changing the UID of a message when it is
copied to a new folder (I'm looking at you, EAS). Add a callback
to Folder.copyMessages() which allows the store to report back
such changes. Then, add a new api to record the new values:
Folder.updateMessages().
For now, the two APIs are linked by a common callsite in
MessagingController, so the existing stores can use a minimal
implementation - if they don't call the callback, nobody will
call the update.
BUG=1807499

Automated import of CL 147620
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
1f48259d22001f3e745e34e1bf142dfaf6cad94b 15-Apr-2009 Andy Stadler <> AI 146360: Provide an API by which the server (or store) can tag some
of the role-specific folders such as Drafts, Sent, or Trash.
This allows us to properly target these folders even on
systems where they have different names. I capture the
tagged names into the existing columns in the account data,
where they are used elsewhere in the code (no changes
necessary).
Use default implementations on POP3 and IMAP for now -
no change from original behavior. The new code is
primarily to support EAS (for now).
BUG=1790798

Automated import of CL 146360
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
c6039f7d17eea53ea7aa59dfade42d9546440929 14-Apr-2009 Andy Stadler <> AI 146134: Add persistence API for remote stores & folders to use while
syncing. This provides a key-value store, per folder, that
can be used by network Stores to record persistent data such
as sync status, server keys, etc.
Note that, by definition, this only applies to remote folders
(e.g. IMAP, POP3). You'll see everywhere that LocalFolder is
passed null, and this is correct - LocalFolder *is* persistent
storage and does not need external help.
Note to reviewers: The core changes are Folder.java,
LocalStore.java, and LocalStoreUnitTests.java, so please give
them the bulk of your reviewer attention. The other files
are just following along with minor API changes. Of those,
the one worth close examination is MessagingController.java,
which is the only place in the system where remote Folders
are bonded with Local Folders and thus where this new API
comes into play.
Note to jham: Can you please take a look at
LocalStore.LocalFolder.setPersistentString() and recommend
better SQL foo than my primitive test-then-update-or-insert
logic, which is not transactional or threadsafe.
BUG=1786939

Automated import of CL 146134
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
cd7e5664f9de81dbe3ba8e57941ca6aa6c1dc3d7 14-Apr-2009 Andy Stadler <> AI 146061: Add persistent storage that Store classes can access.
The current design for Store classes (e.g. IMAP) did not provide for
any persistent storage. This is the beginning of a mechanism to
provide that. It's quite simplisitic - each Store can read/write one
persistent string - but that's enough for the first simple use case
(saving some sync data for EAS).
The core changes here - suggest reviewing first - are in Account.java,
Store.java, and AccountUnitTests.java. Everything else is just
following the API change that was necessary.
Note that, by definition, this only applies to remote stores (e.g.
IMAP, POP3). You'll see everywhere that LocalStore is passed null, and
this is correct - LocalStore *is* persistent storage and does not need
access (so far, at least).
BUG=1786939

Automated import of CL 146061
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
ae8ca3fbd1545c3a94011d7d70bcadac99e7779f 27-Mar-2009 Andy Stadler <> Automated import from //branches/donutburger/...@143018,143018
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
3469902379242c723b871d1dcb09b02d0998d538 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
96c5af40d639d629267794f4f0338a267ff94ce5 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
8c2158a5ebb88e226c23b66ff95910158a2727df 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java
687f9962d7095e18ef994cd0e64337f02ed1a5bd 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/packages/apps/Email/tests/src/com/android/email/mail/store/Pop3StoreUnitTests.java