Commit Graph

65 Commits

Author SHA1 Message Date
Jean-Baptiste Queru
56e48981f0 eclair snapshot 2009-11-12 18:46:09 -08:00
Andrew Stadler
fe5ed7b4b5 DO NOT MERGE Remove test code
Bug # 2092944
2009-09-02 15:20:32 -07:00
Mihai Preda
629e18ad86 Fix base64 decoder. BUG 2081740.
It was broken by CL 22378.
The bug was in the situation when "==" (two padding chars) were at
the end, the reading did not stop after the first '=',
and thus one more char of output was generated.
Add more unit-test for base64 decoding.
2009-08-27 22:24:30 +02:00
Takaoka G. Tadashi
4f23ebd3dc 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
2009-06-26 10:36:27 +09:00
Mihai Preda
a492673609 Review Email tests annotations (small/medium/large) and change some annotations based on time.
Fix an NPE appearing when running the test suite.

BUG: 1566281, 1910409.
2009-06-18 12:16:28 -07:00
The Android Open Source Project
a244abdad0 Do not merge. Merge commit '14f3e16' into donut 2009-06-15 00:08:40 -07:00
Mihai Preda
0dff228dc7 AI 149714: Download inline images for viewing if necessary and don't
delete attachment cache files if these are inline images.
  The purpose of original logic of loadAttachmnet() is to keep
  at most one attachment cache, probably to limit the size of
  cached file.  But it also purges all inline images.
  Integrates CL 149551 from DocomoEmail.
  BUG=1884385,1860250

Automated import of CL 149714
2009-06-10 10:48:32 -07:00
Mihai Preda
a9576bdad6 resolved conflicts for merge of 7403a54738 to donut 2009-06-08 20:52:12 +02:00
Mihai Preda
7403a54738 AI 149664: Move escapeChar from MessageView to EmailHtmlUtil.
Integrate CL 148437 from DocomoEmail.
  BUG=1860250

Automated import of CL 149664
2009-06-08 11:21:18 -07:00
Andrew Stadler
a392e070bc Add android.permission.WRITE_EXTERNAL_STORAGE
Add unit test to verify writeable to sdcard.

Fixed bug http://b/issue?id=1883487
2009-06-04 15:16:43 -07:00
Mihai Preda
7330fe4953 Merge branch 'readonly-p4-donut' into donut 2009-06-04 11:40:35 -07:00
Mihai Preda
70798a7892 AI 149573: Display To: instead of From: in Drafts folder && Display unread message count for inbox, total message count everywhere else.
Integrates from imode email: 148948,149107,149247,149248,149249,149287.
  BUG=1591391,1842520,1860085,1459866,1860250

Automated import of CL 149573
2009-06-04 11:38:26 -07:00
Mihai Preda
438275b283 Merge branch 'readonly-p4-donut' into donut 2009-06-04 09:42:51 -07:00
Mihai Preda
ca5089efb8 AI 149564: Escape special characters such as '<>&' in text/plain for display in WebView.
Integrate CL 144586,145919 from imode.
  Remove the Emoji escaping/workaround for WebView.
  Also integrate MimeHeader.java from CL 143064 from imode.
  BUG=1785319,1860250

Automated import of CL 149564
2009-06-04 09:39:24 -07:00
Mihai Preda
d64d0e56de Merge branch 'readonly-p4-donut' into donut 2009-06-03 06:47:40 -07:00
Mihai Preda
7436601fae AI 149523: Correctly display inline images in Reply and Forward messages.
Integrates CL 148436, 148515, 148833 from imode email.
  BUG=1814789,1860250

Automated import of CL 149523
2009-06-03 06:44:47 -07:00
Mihai Preda
fbde900c37 Merge branch 'readonly-p4-donut' into donut 2009-06-01 11:31:52 -07:00
Mihai Preda
5182d80674 AI 149442: Integrate CL#140625 (Fix attachment uri and content uri confusion) from imode to donut.
BUG=1598754,1860250

Automated import of CL 149442
2009-06-01 11:28:33 -07:00
Tadashi Takaoka
7b92d9a2a9 Merge branch 'readonly-p4-donut' into donut 2009-05-27 19:06:31 -07:00
Tadashi Takaoka
a8884b9b72 AI 149328: Add extended header support to MimeMessage, MimeBodyPart, and LocalStore.
This extension is necessary to support some vendor specific
  extended header, such as X-NoRtn-Addr of i-mode.net mail.
  This change will update LocalStore database version to 24.
  And it should be consistent between donutburger Email and DocomoEmail.
  BUG=1741969

Automated import of CL 149328
2009-05-27 19:03:34 -07:00
Andrew Stadler
b011a812e0 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.
2009-05-22 11:48:14 -07:00
Andy Stadler
c6efb28ad3 AI 149059: Manually merge CL 148988 to fix "Not to revert SEEN flag if POP, and
fixed counting unread messages bug".
  BUG=1785254

Automated import of CL 149059
2009-05-20 10:36:16 -07:00
Andy Stadler
80257af81b AI 149020: Manually merge CLs 148814, 148818 which fix IMAP response parsing to be
able to handle a literal string in the middle of the response.
  BUG=1814528

Automated import of CL 149020
2009-05-19 14:54:49 -07:00
Andy Stadler
93116fe28e AI 148457: Allow exchange accounts to be set up without an empty domain
specification.  This relaxes a rule that was incorrectly applied.
  BUG=1740626

Automated import of CL 148457
2009-05-07 10:58:05 -07:00
Andy Stadler
08e2bc5bb4 AI 148382: Check cursors in LocalStore so we avoid errors when the folder itself
has been deleted from the DB.  Add unit tests.
  BUG=1835733

Automated import of CL 148382
2009-05-06 18:01:47 -07:00
Andy Stadler
e67a433c44 AI 148381: Fix broken tests
BUG=1776149

Automated import of CL 148381
2009-05-06 17:58:01 -07:00
Andy Stadler
843125b98a AI 148300: Reduce memory waste in getTextFromPart(), and improve error handling.
Fix NPE's in loadMessageForViewBodyAvailable().
  BUG=1831272

Automated import of CL 148300
2009-05-05 10:26:55 -07:00
Andy Stadler
c9f151d4fe 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
2009-05-01 16:36:34 -07:00
Andy Stadler
c5c2b96739 AI 148145: Remove the account-based storage of store persistent data, and instead
combine it with the same code that handles folder persistent data (in
  the database).  The schema is really simple;  Rows with a folder id of
  -1 are store data.  This also adds the ability to use keys to store
  multiple values, instead of a single string per account.  Added/updated
  unit tests.
  3rd party stores will need slight code changes because the persistent
  callbacks now accept keys.
  BUG=1807499

Automated import of CL 148145
2009-04-30 16:47:50 -07:00
Andy Stadler
d8cbeaf7ae AI 148098: Manual merge CL 148086 to fix additional problems with non-ASCII chars
in address fields.
  BUG=1676634

Automated import of CL 148098
2009-04-30 10:18:00 -07:00
Andy Stadler
067d0a87fa AI 148097: Fix bug in exchange account setup (actually it only affects
editing existing accounts).  Added simple functional tests for
  Activity UI.
  BUG=1812798

Automated import of CL 148097
2009-04-30 10:14:00 -07:00
Andy Stadler
0cfffc5222 AI 148091: Manual merge CL 148078 which resolves bugs when you have non-ASCII
names in email address fields of MessageCompose.
  BUG=1676657

Automated import of CL 148091
2009-04-30 09:38:30 -07:00
Andy Stadler
3c3add638e AI 148027: Fix concurrency failure in Folder.getUnreadMessageCount() and
Folder.getVisibleLimit(), which used local copies of the data from the
  DB.  If there were two Folder objects associated with a single actual
  folder, updating one wouldn't be reflected in the others.
  BUG=1812798

Automated import of CL 148027
2009-04-29 17:17:14 -07:00
Andy Stadler
c05afb24bb AI 148019: Add "accountInstanceLimit" to stores.xml so a given type of connection
(e.g. EAS) can limit itself to n (usually 1) accounts per device.
  The UI for this is really simple - don't show the EAS button when the
  limit is reached.  More work would be required in
  AccountSetupAccountType.java in order to do a more sophisticated UI
  (e.g. show the button but pop a toast if the limit is reached.)
  BUG=1740626

Automated import of CL 148019
2009-04-29 17:10:25 -07:00
Andy Stadler
8264c4fa21 AI 148002: Add X_DOWNLOADED_FULL, X_DOWNLOADED_PARTIAL, and DELETED flags
to the set that are stored in their own columns (and thus can
  be quickly selected from).  Add code to migrate old style
  flags into new flags.  Add tests.
  BUG=1786939

Automated import of CL 148002
2009-04-29 17:07:03 -07:00
Andy Stadler
a13aea24a3 AI 147868: Fix CL 146360 which didn't make the changes persistent. Changed
MessagingController to accept and track a Context, instead of the
  unnecessary Application object, which makes this fix more testable.
  BUG=1790798

Automated import of CL 147868
2009-04-27 17:24:41 -07:00
Andy Stadler
5551f7feb2 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
2009-04-24 11:54:42 -07:00
Andy Stadler
b633efa2b7 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
2009-04-24 11:13:36 -07:00
Andy Stadler
1df530294d 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
2009-04-23 23:16:01 -07:00
Andy Stadler
72288724d4 AI 147538: Because mPreferences is transient, we need to pass Context into the
persistent callbacks, in order to recreate it occasionally.
  BUG=1786939

Automated import of CL 147538
2009-04-23 16:42:23 -07:00
Andy Stadler
2990ff1f96 AI 147452: Update LocalFolder.fetch() to support STRUCTURE mode, in
addition to existing support for BODY mode.  Add tests.
  BUG=1807499

Automated import of CL 147452
2009-04-22 23:48:59 -07:00
Andy Stadler
29bbfd0b97 AI 147401: Redo the implementation of store-specific flags to allow
deeper database-style operations with them.  This enables two
  new LocalStore APIs to be provided:  A new version of
  GetMessages() that can retrieve only flagged (or un-flagged)
  messages, and a new method to set flags for an entire set of
  messages, in a single SQL transaction.
  BUG=1786939

Automated import of CL 147401
2009-04-22 13:49:57 -07:00
Andy Stadler
7e6df9c6aa AI 146379: Provide a small set of message flags that can be set by stores and will
be persisted by LocalStore.
  BUG=1786939

Automated import of CL 146379
2009-04-15 15:29:00 -07:00
Andy Stadler
1f48259d22 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
2009-04-15 12:58:19 -07:00
Andy Stadler
4836f3c289 AI 146331: Make the download window sizing adjustable on a per-store basis.
The default values are 25 (default) and 25 (increment).  This is fine
  for Stores that control downloads by # of messages, but won't work for
  stores that use other measurements - e.g. EAS windows the download in #
  of days.  So for this change:
  1.  Allow the StoreInfo to provide non-default values
  2.  Remove the hardcoded references to the default values
  3.  Use StoreInfo values everywhere
  4.  Set the values to 1,1 in EAS store info
  BUG=1789913

Automated import of CL 146331
2009-04-15 10:58:59 -07:00
Andy Stadler
c6039f7d17 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
2009-04-14 10:15:07 -07:00
Andy Stadler
cd7e5664f9 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
2009-04-13 20:07:56 -07:00
Andy Stadler
ea6fea9bb2 AI 144953: Provide UI for push mode accounts.
1.  Generalize the code for the various spinners that control
  account check frequency.
  2.  Provide an API for looking up store attributes (and refactor
  existing instatiateStore logic to use it).
  3.  Cleanup the old code that was used to setup frequency spinners.
  4.  Hardwire Exchange accounts to default into push mode.
  Notes to tester:
  1.  For each account type (POP, IMAP, EAS) we need to check that
  auto & manual creation "do the right thing" for frequencies.
  POP & IMAP should offer "none" or time intervals, while EAS
  should offer "push", "none", or time intervals.
  2.  EAS accounts should default to "push", all others to "15 min"
  3.  Make sure that you can edit existing account settings and see
  the right choices (only EAS should be offered push).
  4.  I couldn't write an automated test for the mail checker service,
  please confirm that POP & IMAP accounts are checked at the right
  intervals (or never, if set for "none".)
  BUG=1776149

Automated import of CL 144953
2009-04-07 17:35:13 -07:00
Andy Stadler
ae8ca3fbd1 Automated import from //branches/donutburger/...@143018,143018 2009-03-26 17:05:25 -07:00
Tadashi Takaoka
2a34cb9c9c Automated import from //branches/donutburger/...@142523,142523 2009-03-25 01:30:24 -07:00