Commit Graph

103 Commits

Author SHA1 Message Date
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
Mihai Preda
a00eb291f1 AI 149607: Add relevant title to attachment file chooser.
Delete the original source message only when the message is in Drafts folder.
  If the original message is in the other folder than Drafts, it should be
  retained.
  Integrates 149194,149306,149459 from DocomoEmail.
  BUG=1860250,1887835

Automated import of CL 149607
2009-06-05 11:36:17 -07:00
Mihai Preda
7eb313fb00 AI 149604: Localized the special folders name in FolderMessageView.
Integrates 149049,149217 from DocomoEmail.
  BUG=1860091,1860250

Automated import of CL 149604
2009-06-05 10:48:20 -07:00
Mihai Preda
c099563834 AI 149603: Show progress dialog while loading attachment. Fixed possible ArrayIndexOutOfBoundsException in message view.
Integrates 149422,149510,149516 from DocomoEmail.
  In some situation, email header From: might be empty or have
  illegal email address.  The assumption that From: must exist
  will be violated and causes ArrayIndexOutOfBoundsException.
  BUG=1741969,1890770,1860250

Automated import of CL 149603
2009-06-05 10:33:22 -07:00
Mihai Preda
980385b0f9 AI 149600: Fixed message view web link be more robust.
Integrates 149300 from DocomoEmail.
  This is work around for
  - Regex.WEB_URL_PATTERN would not handle protocol part case
  insensitive correctly.
  - WebView only could follow the href link that protocol part
  is lower case.
  BUG=1860250,1842508

Automated import of CL 149600
2009-06-05 08:34:52 -07:00
Mihai Preda
e6ec9d86e8 AI 149578: Fixed possible NullPointerException in MessageCompose.
Integrates 148996,149295 from imode email.
  BUG=1862155,1798576,1860250

Automated import of CL 149578
2009-06-04 12:48:20 -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
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
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
39137e51aa AI 149446: Add sending pending outbox message feature; integrates 148664, 148823 from imode to donut.
BUG=1860250,1793767

Automated import of CL 149446
2009-06-01 12:38:20 -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
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
Andy Stadler
fc9e1ce030 AI 149203: Manual merge CL 149118: "Make URL which is in the head of body text be
clickable."
  BUG=1810716

Automated import of CL 149203
2009-05-22 12:14:07 -07:00
Andy Stadler
c2887cd81d AI 149140: Automated g4 rollback of changelist 148333.
*** Reason for rollback ***
  Rollback global lock because bug (now fixed) was not caused by
  threading/concurrency.
  *** Original change description ***
  Evidence from failures, and inspection of source, leads me to believe
  that SharedPreferences has some non-thread-safe paths.  As a quick,
  brute-force workaround, I'm putting a global lock around our use of it.
  This is a bit inefficient, but cases of multiple threads writing to it
  should be very rare.
  Note, we don't have an explicit test for this (I will think about
  finding a way to write one), but the evidence of this failure is that
  after some amount of activity in the Email app, we see corrup
  ... description truncated by g4 rollback ...

Automated import of CL 149140
2009-05-21 10:39:04 -07:00
Andy Stadler
f9edef8dee AI 149088: Automated g4 rollback of changelist 148488.
*** Reason for rollback ***
  Problem found (bug in ICU encoder/decoder) so instrumentation no
  longer required here.
  *** Original change description ***
  Heavily-instrumented Account.java that's looking for the precise moment
  when an Account string gets corrupted.  Looks for bad base64 strings
  and bad store Uri's.  Logs the error, and (optionally/disabled) throws
  an exception (good for debugging).
  BUG=1822859

Automated import of CL 149088
2009-05-20 17:23:48 -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
305382f790 AI 148488: Heavily-instrumented Account.java that's looking for the precise moment
when an Account string gets corrupted.  Looks for bad base64 strings
  and bad store Uri's.  Logs the error, and (optionally/disabled) throws
  an exception (good for debugging).
  BUG=1822859

Automated import of CL 148488
2009-05-07 14:43:25 -07:00
Andy Stadler
3cf41764e3 AI 148485: Clean up the scrollview layout so the button bar is always on the
bottom of the screen.
  Also removed an extra ':' in a string on the screen (none of the other
  label strings have ':').
  BUG=1740626

Automated import of CL 148485
2009-05-07 14:30:53 -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
615fcaf337 AI 148378: Allow store to create BinaryTempFileBody from a preexisting file
instead for forcing a copy via input stream.
  BUG=1807499

Automated import of CL 148378
2009-05-06 17:54:14 -07:00
Andy Stadler
dab90a7b35 AI 148377: Push Mode changes: (1) Add android.permission.WAKE_LOCK and
READ_PHONE_STATE so a push mode service can hold an active
  network connection, monitor roaming status, etc.  (2) Refresh
  push mode status on Refresh(), not just on Check, so UI
  (settings) changes, which call refresh(), propagate immediately
  to the stores.
  BUG=1776149

Automated import of CL 148377
2009-05-06 17:50:29 -07:00
Andy Stadler
63a22008c7 AI 148376: Two policy changes for lookback window: (1) Change default
for new accounts to "1 day".  (2) Remove "all" from the list
  of available lookback window sizes, to prevent runaway
  during our simplistic sync model.
  BUG=1789913

Automated import of CL 148376
2009-05-06 17:46:25 -07:00
Andy Stadler
3b7a93e8bb AI 148375: Explicitly remove deleted accounts from the Store cache. This resolves
possible bugs when an account is deleted and recreated.
  BUG=1740626

Automated import of CL 148375
2009-05-06 17:42:22 -07:00
Andy Stadler
235609d04e AI 148334: Provide a new entry in MessageUpdateCallbacks by which the store can
indicate that the message of interest no longer exists.  This is used
  in remoteFolder.copyMessages, for example because the message was
  already deleted by another client.
  BUG=1807499

Automated import of CL 148334
2009-05-05 16:36:31 -07:00
Andy Stadler
5293030ba0 AI 148333: Evidence from failures, and inspection of source, leads me to believe
that SharedPreferences has some non-thread-safe paths.  As a quick,
  brute-force workaround, I'm putting a global lock around our use of it.
  This is a bit inefficient, but cases of multiple threads writing to it
  should be very rare.
  Note, we don't have an explicit test for this (I will think about
  finding a way to write one), but the evidence of this failure is that
  after some amount of activity in the Email app, we see corruption in
  the string mSenderUri.
  BUG=1822859

Automated import of CL 148333
2009-05-05 16:32:33 -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
09866af013 AI 148257: Allow preview of any files (mime type */*) by removing
the original filters.  This affects preview, not download.
  This does not preflight the launch at all, it is very simple
  as it simply downloads the attachment and then tries to open it.
  If no activity is found, it uses a toast to say "couldn't do
  that."  A better fix will be to pre-check the mime type to see
  if there are any intent filters to handle it.
  BUG=1650669

Automated import of CL 148257
2009-05-04 10:28:41 -07:00
Andy Stadler
62c4a62985 AI 148256: Finish cleaning up the concurrency bugs in FolderMessageList.
At this point, *all* MessageListener callbacks should have their
  work routed through the handler for deeper processing (especially
  anything that affects the lists) to be in the UI thread only.
  Also fixed a minor regression introduced in CL 148096 (on
  configurations with a single account, the inbox was not
  automatically preopening - this affected desktop shortcuts
  as well.)
  BUG=1812798

Automated import of CL 148256
2009-05-04 10:22:54 -07:00
Andy Stadler
1e2ca965e7 AI 148255: Don't show "Outgoing Settings" preference when sender does not
provide a class for launching the settings editor.
  BUG=1812798

Automated import of CL 148255
2009-05-04 10:17:27 -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
9197f42894 AI 148216: Provide UI for fixed sync window sizes, as required by EAS.
When in fixed sync window size mode, change "load more
  messages" to "refresh".
  BUG=1789913

Automated import of CL 148216
2009-05-01 15:30:33 -07:00
Andy Stadler
035dfc0859 AI 148215: Provide a better way for stores to get their callbacks, since they
might be null at creation time, and available slightly later.
  BUG=1807499

Automated import of CL 148215
2009-05-01 15:25:32 -07:00
Andy Stadler
9ba72bb00d AI 148204: Encapsulate a requirement for some remote stores, that need to preload
message structures before fetching the message body.  Code for IMAP &
  POP3 is unaffected, but remote stores can override
  requireStructurePrefetch() in order to trigger the new behavior.
  BUG=1807499

Automated import of CL 148204
2009-05-01 14:40:58 -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
05aba0b4ba AI 148096: Fix multiple concurrency bugs in FolderMessageList, which wasn't
being strict enough about decoupling the MessageListener from
  updates to the various lists that should only happen in the UI
  thread.
  BUG=1812798

Automated import of CL 148096
2009-04-30 10:08:25 -07:00
Andy Stadler
c795d8b324 AI 148095: In MessageView, protect the listener callbacks that directly
access mMessageContentView.
  This is a brute-force solution, and I have also left TODO notes
  mentioning that it might make more sense (long term) to use the
  existing handler message mechanism.
  BUG=1812798

Automated import of CL 148095
2009-04-30 10:04:06 -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
de6b2519be AI 147866: To better support remote stores that write back persistent data
or other changes during a delete operation, we need to explicitly
  open the remote trash folder and give it the callbacks.
  BUG=1807499

Automated import of CL 147866
2009-04-27 17:17:22 -07:00
Andy Stadler
6c0cd49610 AI 147839: In checkMail(), do a listFolders() before the existing sync...()
calls for each account.  This allows the folder list to be
  updated before it is synced, which is necessary for some
  stores.
  BUG=1807499

Automated import of CL 147839
2009-04-27 09:18:01 -07:00
Andy Stadler
b24a1eb3d0 AI 147765: Fix concurrency bugs in MessagingController, in the collections
mCommands and mListeners.
  BUG=1812798

Automated import of CL 147765
2009-04-24 16:17:04 -07:00
Andy Stadler
100867a231 AI 147730: 1. Create an API by which a Store can specify its own custom
synchronizer code.
  2. Refactor (and spell-fix) the core folder synchronizer.  Extract
  the innards that are IMAP/POP specific, leaving common wrapper
  code in a simpler shell.
  3. For each account & folder to sync, check the store and call
  the specialized sync'er (if provided) or the generic one.
  BUG=1807499

Automated import of CL 147730
2009-04-24 13:25:34 -07:00