Commit Graph

27 Commits

Author SHA1 Message Date
Marc Blank
a6885ba97d Remember base64 decoding for IMAP attachments
* Also, add debugging class to EmailProvider

Bug: 6995516
Change-Id: Ia96415caa61f26d55f09beb76fb3f34a40b53691
2012-08-21 10:34:39 -07:00
Marc Blank
cf566e251b Make sure that all access to service map is lock-protected
Bug: 7013731
Change-Id: I9da734d19597997b34d6079cf013064262a75ec4
2012-08-19 08:30:56 -07:00
Marc Blank
e2cf1c58ed Use proper values for SSL flags; remove obsolete code
Bug: 7013259

Change-Id: I8be865806844d4f7bad6bfe65d08735051de6db8
2012-08-18 14:10:12 -07:00
Marc Blank
49f5c000a9 Add space in IMAP command
* Some servers seem to require it (sigh)

Change-Id: I8d9c4c4ccfce574844f3a49b5ac93b4dffa17009
2012-08-17 17:23:35 -07:00
Marc Blank
277dd4a9ba Show alert message (if any) after Imap2 validation failure
Change-Id: Ibfee4526330184dd9780f56dd52292a10d7b6f41
2012-08-17 15:14:04 -07:00
Marc Blank
ca1cf24076 Handle non-ascii folder names properly
Bug: 6992874
Change-Id: I098af4a867256f30b3610e42cadc9651c490abd8
2012-08-17 13:54:59 -07:00
Marc Blank
11efcb7a1b Fix handling of header data
* gmx.de returns values in an unusual order, leading to the
  bugs listed below

Bug: 6962533
Bug: 6963464
Change-Id: I937b617c1993ab824f5e55ad0b072afeaee61b5c
2012-08-17 11:59:56 -07:00
Marc Blank
8826466533 Fix NPE during Imap2 setup when using WiFi only device
Change-Id: Ib85e2f522e3d56f4881bfcba368501bec8d37daa
2012-08-03 12:32:06 -07:00
Marc Blank
cbd32b78d7 Fall back to 10 minute sync if IDLE isn't supporte
Bug: 6927659
Change-Id: Iaa43d0b4bdbfa0697eabd6d23f0c9ea45ffb0d05
2012-08-03 09:37:38 -07:00
Marc Blank
7d5e2a7c08 Do "same certificate" checking when using "trust certificates"
* Refactor/simplify Transport/MailTransport
* Add serverCert column to HostAuth table in EmailProvider
* During first connection to server, save the server certificate
  in the HostAuth; on subsequent connections, ensure that the
  certificate presented has the same public key as the one
  stored
* For now, we'll just fail to connect (with a CertificateException)
  if there's a mismatch

TODO: Add some UI to handle different certificates

Bug: 6888866
Change-Id: Ia79497e89eaad8d43617b50d3771121b2ed7f687
2012-08-01 09:04:44 -07:00
Marc Blank
691d4311a1 Don't use STARTTLS if we're already using SSL
Change-Id: I572274abb2d0a52cafd7e0149a74440453ac3e27
2012-07-31 14:28:16 -07:00
Marc Blank
125a2435d6 Use Imap2 for auto-setup (if installed)
* And warn user (allowing her to switch to legacy adapter)
* This is temporary, for use in testing and marked STOPSHIP

Change-Id: I2510b0855a67c09add116d827185ff14596f44dd
2012-07-29 13:41:34 -07:00
Marc Blank
8348b78f22 Say that Imap2 supports folder search
Change-Id: I23725292c424f1388fd995e08b45eb3ce4190dd3
2012-07-27 17:02:01 -07:00
Marc Blank
dba0b20d95 Handle ALERT response to login command
* Allow AccountService loginFailed API to take a reason string
* Present the reason string in the dialog shown from the login
  failure notification
* Handle ALERTs in IMAP login responses (for example, some servers
  will occasionally require web login and we need to inform them,
  rather than simply saying the password is wrong)
* This fixes a longstanding bug in our Imap1 implementation

Change-Id: I8b270cd5d4746559b6c8a78bce02f0e7c525bdea
2012-07-27 13:36:41 -07:00
Marc Blank
0b6b83c6f9 Imap2 additions
* Implement first-pass Imap2 server-side search
* Improve number parsing performance
* Better handle the BodyThread (loading message bodies)

Change-Id: I0ccd7377c80a0553b086d5204b211067896a2f49
2012-07-27 11:58:48 -07:00
Marc Blank
0b5f15d61e Make sure account capabilities get set properly in UIProvider
* Change getCapabilities API to take an account, rather than
  the id of the account
* getCapabilities() can therefore execute even before Exchange
  is fully up and running

Change-Id: Id4c2a9942ea7a21e0c56401c50206b680274b43e
2012-07-25 13:25:02 -07:00
Marc Blank
e60ed86c38 Support STARTTLS in Imap2
Change-Id: I5df317773db35df572866bc5f5843eef69766925
2012-07-24 10:23:33 -07:00
Ying Wang
bdc47d309c Merge "Import translations. DO NOT MERGE" into jb-ub-mail 2012-07-23 12:45:08 -07:00
Ying Wang
e1b325d611 Import translations. DO NOT MERGE
Change-Id: I4f97d595dc5a650fa502b53817edc7557ffcb700
Auto-generated-cl: translation import
2012-07-23 10:37:17 -07:00
Marc Blank
cbd178e49c Log out when done w/ IMAP sync
Change-Id: Ic9993288a331960ba9c492e0ef051c737f1e947f
2012-07-23 10:18:08 -07:00
Ying Wang
f3702a9796 Merge "Import translations. DO NOT MERGE" into jb-ub-mail 2012-07-20 11:37:50 -07:00
Ying Wang
b1f88ba216 Import translations. DO NOT MERGE
Change-Id: Ie154e2a86d0fa71efa0c20ac2993707e78006dfe
Auto-generated-cl: translation import
2012-07-20 11:02:03 -07:00
Marc Blank
00287c4d8f Remove unused code; rename some constants
* Also handle large batch operations in chunks

Change-Id: Ie566cb8d8bb73e8edd663de5228e905c223f031b
2012-07-20 10:25:11 -07:00
Marc Blank
77a9966f46 Merge "More work on Imap2" into jb-ub-mail 2012-07-19 14:27:49 -07:00
Marc Blank
a8b683cf3f More work on Imap2
* Handle sending mail and moving to sent folder
* Implement picker for sent folder
* Upload sent items to server
* Add support for "automatic" sync window
* Move some files from Email -> emailcommon
* The added files are copied directly from Email (and can be
  removed if/when Imap2 is merged back with Email)

Change-Id: I3a6a3d224826e547748be2f1b567b6294ad5db89
2012-07-19 14:27:17 -07:00
Ying Wang
000dc719c4 Import translations. DO NOT MERGE
Change-Id: I9a939c978e8917a6b6051b6405b177a3fb5d2944
Auto-generated-cl: translation import
2012-07-19 12:14:11 -07:00
Marc Blank
c6089bc01f Initial Imap2 implementation
This CL includes the following:
* New Imap2.apk generation (not included in builds)
* "Push IMAP" option for accounts when Imap2.apk present
* Account creation/setup
* 2-way sync of messages, deletions, flag updates
* Push (messages, flags)
* Folder list hierarchy handling
* Message text (one plain or html part)
* Picker UI for trash folder (placeholder)
* Capabilities handling/UI command

Major Imap2 new features:
* Push
* Multiple folder sync
* Sync window (like EAS)

TODO:
* Picker UI for sent folder
* Upload of sent messages to server
* Search
* Multiple viewable parts
* Probably lots more, incl. unit tests

Change-Id: Ia5d74073d9c307e0bdae72a7f76b27140dde7d14
2012-07-18 11:32:26 -07:00