Commit Graph

14 Commits

Author SHA1 Message Date
James Lemieux 0dffe3afd7 Keep on getting a couldn't sign-in notification
b/11551107

This is caused by ImapConnection.doLogin() only throwing
AuthenticationFailedExceptions and not other varieties of exceptions.

While fixing this bug, I discovered that the ConversationListFooterView
that is displayed in response to a authentication failure contains a
button called "Sign In" that didn't actually do anything. I made it
navigate to the incoming account settings fragment where the user is
free to change the relevant account credentials.

Change-Id: I2c772ecab18f3e57059eceeae01de08f1fdab4c2
2014-03-07 16:38:47 -08:00
Martin Hibdon b94bfc31cd Remove some security violating logging
Change-Id: Icf53b132516be5f1b392fb9bd3a8970634212642
2014-02-14 15:36:38 -08:00
Martin Hibdon 4e952d9cf4 Fix a privacy violating log
Change-Id: I0c49fde90e4c14e6751a927d0963533092fbef52
2014-01-08 09:30:16 -08:00
Martin Hibdon e8eb6e659b Make OAuth work
Now you can authenticate your account using oauth
for google hosted accounts (e.g. google.com, gmail.com)
The setup ui is still not up to spec.

Change-Id: Ib2826653550a823b4d1b8739c1e483746cccbc22
2014-01-03 14:05:46 -08:00
Martin Hibdon 5de5354918 Update some error logging
Now it logs stack traces of exceptions, and does not use
exception.toString() as the format specifier, which can be
dangerous.

Change-Id: If841426067017c574c4aff88b8d8ae6b49ee867a
2014-01-03 08:54:34 -08: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 9a2686afa2 Improve POP sync.
- Set socket timeout as soon as you open it. This was how
  IMAP worked, so I just moved the call up one level. This
  should help one of the sync forever scenarios.
- Simplify the SQL query for getting a Mailbox.
- Try to load messages that failed to load last time.
- Always close the connection to the remote folder.
- Don't try to be too clever in fetching the body.
  This needs to be fixed later for attachements, but for
  now seems to work better and will let me get more testing.

Change-Id: I91b6a6f2a2846b34b1a0c50eb4eb37fc947389ce
2013-04-17 10:54:33 -07:00
Marc Blank 5c52385838 Restore Imap1
* Restore Imap1 code
* Legacy users will use Imap1
* Existing Imap2 users will continue to use Imap2
* New accounts will be created in Imap1
* More to follow

Bug: 7203993

Change-Id: I8b86fcada59a854fd464d5269c94d00ebae85459
2012-09-21 08:29:09 -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 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 f419287f22 DO NOT MERGE: Move emailcommon2 sources to emailcommon
Change-Id: I06df7e467cd2e0117df8b8db3ddc6ff9da13f1c7
2012-06-28 11:15:06 -07:00
Marc Blank 20bf1f632f Support IMAP search in UTF-8, in addition to US-ASCII
* The existing IMAP search code is well-known to be primitive and
  largely broken.  In particular, it fails with any non-ASCII
  character and with a variety of symbols (e.g. quotes, slashes,
  etc.)  Basically, it's an accident waiting to happen, returning
  empty data sets even when the query might reasonably be expected
  (or known) to return valid data.
* The current CL uses the IMAP literal string format to represent
  the query text; this string can be sent either in ascii or in
  UTF-8, and since it is sent as an octet (byte) count followed by
  8-bit data, it also solves any quoting issues that might come
  up.  So, we kill two birds with one stone.
* The bug in question was punted to a subsequent MR; however, I
  think it would be a mistake to ship the code without this
  CL, which has been tested against the three common IMAP servers
  that we aim to support.

Bug: 4690713
Change-Id: Iaa542bfc56737871f3cbc9c83f0e768415a7f2b6
2011-08-17 16:17:04 -07:00
Todd Kennedy 171c3f2273 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
2011-05-16 14:47:49 -07:00
Todd Kennedy ebece4dbdc Make ImapConnect a top-level class
Split out ImapConnection to its own class. This allows us to update ImapStore
without worrying about links between it and the connection.

Also, added a bit more safety to the classes in terms of correctly freeing
resources. Whenever the connection is closed, it now releases all resources.
Additionally, if the connection is ever put back in the pool, any response
data is released.

Change-Id: Ie3bda40d677707a0d6655f57175e58dece539e19
2011-05-16 14:17:58 -07:00