Commit Graph

28 Commits

Author SHA1 Message Date
Scott Kennedy
26f741fbaf Remove some warnings
Change-Id: Ifc855a6c8623bd980807064477635c19b8ed81e0
2013-08-01 22:14:01 -07:00
Yu Ping Hu
2075c97f60 Delete most of IEmailServiceCallback.
The old callback mechanism is deprecated, in favor of making
calls on the ContentProvider.

Bug: 9842867

Change-Id: I65f559e593cda24456c4ffb96f785e054626dd0b
2013-07-29 20:04:42 -07:00
Scott Kennedy
560bfadc31 Unify LogTag
There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: I55f1c7a66ce50ead54877a13e40256422a56dc39
2013-06-05 20:06:15 -07:00
Yu Ping Hu
d1bae6c1e8 Switch constants to existing standard values.
Change-Id: I1dc5a6b7ceb5b13975a9366f11a945f5b111842c
2013-05-08 18:10:48 -07:00
Yu Ping Hu
1484c6663d Code cleanup.
- Cleanup sync adapter to not have statics & locks.
- Remove some dead code.

Change-Id: Ia310d32b93706dc3742ccee74e5b751174280488
2013-04-30 14:21:19 -07:00
Yu Ping Hu
9e7f5a2a33 Use system SyncManager for Exchange.
Change-Id: I77e4e75c94c532d22a28cf97e6f55f1259b8bdde
2013-04-25 14:03:00 -07:00
Yu Ping Hu
7539508bfc Add a way to check whether we have a wakelock.
Bug: 8640907

Change-Id: I886af09d20dab195a9bbd38082a02d29e8b864e7
2013-04-18 13:48:57 -07:00
Yu Ping Hu
9ae81e2af0 Move system folder string resources to emailcommon.
This permits us to move shared code for looking up system
folder names to emailcommon, which is also in this change.

Also renames emailcommon2 to emailcommon.

This is part of a multi-project submit with
I4a071a07c3e33aaa4ea404eb66a8db1eabc9ef0e and
I5746c0353783f9b29d52d6540472588c6542a6a2.

Bug: 8383232

Change-Id: I6c6eec4f1bcf2abd54c1ed05da1add8d894ee403
2013-03-19 19:45:52 -07:00
Marc Blank
72d7dda97d Improve service dump a bit
Change-Id: I850aebae0f8b20f0041672dc36a361c5b2d73f9a
2012-09-19 12:46:13 -07:00
Marc Blank
4639556e52 Add bugreport dump of wake lock times
Change-Id: I4086e8ee620ac10d5a3c1673838c567753c1a553
2012-09-19 11:21:14 -07:00
Marc Blank
1bcf32e1b2 Don't sync at all if 1) upsync and 2) held
Bug: 7148468

Change-Id: I93a7734f274263e09ddef1b5cf7d9d7ea58a17c3
2012-09-11 18:07:55 -07:00
Marc Blank
4417adce6d Don't clear errorMap due to upload sync
* Clearing it will prevent backoff behavior from working
  properly when there are changes to be uploaded

Change-Id: I1a1509e42730a3aa36298e3024068b6fe993e045
2012-09-10 12:45:53 -07:00
Marc Blank
e714bb9d15 Convert authorities, intents, and account manager types
* Tested ok on wiped Nexus
* Tested ok on S3
* Upgrade verified on Nexus

Change-Id: If5d4ce594f8a309cdb59589d10b1d33f3b79326c
2012-08-31 23:26:36 -07:00
Marc Blank
70edcf0538 Integrate Imap2 into Email
* Also, convert imap accounts to imap2
* The original imap service remains, but is no used
* There remain some questions about how the upgrade
  should work in terms of settings

Change-Id: I0e05edad6a1553f428a2c2fa3daf1df878d4b5f7
2012-08-22 14:17:57 -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
9531e5ea5f Revert "Make sure that all access to service map is lock-protected"
This reverts commit 9d593aab1b

Change-Id: I2b8f044e2119c60b9a42c7cb84577147c89ea0cb
2012-08-18 17:19:37 -07:00
Marc Blank
9d593aab1b Make sure that all access to service map is lock-protected
Bug: 7013731
Change-Id: Ib5e1f2aa92fd448f0a4131393a34d93315bfa649
2012-08-18 14:03:45 -07:00
Marc Blank
bc53491b95 Ensure that security notification is posted if not active
Bug: 7007658

Change-Id: Ia422c30c47b044279471e549541ac6279735828c
2012-08-17 11:24:39 -07:00
Paul Westbrook
e444155bce Fix ConcurrentModificationException
Bug: 6937046
Change-Id: I82e578d9b31b0064570deee9a9625ddf07826112
2012-08-06 10:50:00 -07:00
Marc Blank
3a83ec1cf8 Don't save connection manager for autodiscover/validation
* Also add outlook.com to providers file

Change-Id: I2c334d1307b84899c3b64bd0c3f0cd92c190576e
2012-08-01 13:51:19 -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
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
41bba664f7 Fix EAS backoff behavior (was stuck at 30 seconds)
Bug: 6881519
Change-Id: Ib0b6f8a07a4bc47d3691c9cfa711e45eaf1955f2
2012-07-25 15:38:50 -07:00
Marc Blank
98497ec7f6 Prevent ConcurrentModificationException in SyncManager
Bug: 6856652
Change-Id: I1a264844cbab159505b4b3ebd32716a469517f0a
2012-07-23 10:17:05 -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
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
Marc Blank
c5afb16430 Add a bunch of stuff missed earlier
Change-Id: I7f707446a963912fe5786dacb5569e68db572d1c
2012-06-28 12:16:59 -07:00