Commit Graph

1064 Commits

Author SHA1 Message Date
Makoto Onuki
bb9b5163c1 Move non-exchange specific classes to com.android.email.service. 2010-01-29 10:37:39 -08:00
Marc Blank
d99dbf01fb Fix problem with Event creation by EAS calendar sync
* Turns out that DURATION is required by CalendarProvider, and
  DTEND has a different meaning than it does to EAS
* Fix downsync to create proper recurring events

Change-Id: Ibf85422de73579a93de89b2c27c13f96994bedc8
2010-01-28 12:31:36 -08:00
Marc Blank
f3fcb8929e Implement Exchange calendar sync support
What should be working:
* Events sync down from server and appear in calendar
* Recurrences and exceptions appear in calendar
* Changed events on server should be reflected in calendar
* Deletions on server should be reflected in calendar
* Push of new/changed/deleted events should work
* Changes on device are NOT synced back to server
* New, single events on device are synced back to server
  (no time zone, attendee, or recurrence support)
* Checkbox for syncing calendar added to setup flow
* System sync glue in manifest, etc.
* Bugs are to be expected
* A few unit tests; needs more

Change-Id: I7ca262eaba562ccb9d1af5b0cd948c6bac30e5dd
2010-01-28 09:18:48 -08:00
Mihai Preda
b4e7a85eaa Merge "MessageCompose: properly remove quoted text from saved draft." 2010-01-28 03:48:20 -08:00
Makoto Onuki
f98ffb6f44 Merge "Add "vendor policy" loader, and alternate exchange descriptive text." 2010-01-27 18:09:05 -08:00
Makoto Onuki
f613489663 Add "vendor policy" loader, and alternate exchange descriptive text.
- Dynamically switch to the alternate exchange strings to substitute overlays.
- Added the mechanism to load the "vendor policy", which tells you when the
  alternate strings should be used.

Bug: 2382710
2010-01-27 17:40:56 -08:00
The Android Open Source Project
d423fb996f am 08d92ebf: merge from open-source master
Merge commit '08d92ebf4722e45216ee225775a3b86f9ceecc0d'

* commit '08d92ebf4722e45216ee225775a3b86f9ceecc0d':
  Trim the mime type portion of Content-Type.
2010-01-27 16:29:17 -08:00
Marc Blank
46199c65a3 Fix #2382368 (NPE in AccountSetupExchangeTests)
* AccountSetupExchange defaultly tries using EAS AutoDiscover, which isn't
  appropriate in the unit test setting
* Add an Intent extra to disable AutoDiscover and use it in unit tests

Bug: 2382368
Change-Id: I3d4e8d7194b02da44ad583da0cf2fe60ffb19311
2010-01-27 13:57:20 -08:00
Andrew Stadler
345fb8b737 Add utilities for processing account security policies
* Add security sync key & signature columns
* Add utilities for easy read/write of security columns
* Write aggregator for multiple accounts
* Simple API's for exchange security (very preliminary)
* Unit tests of above

Bug: 2387961
2010-01-26 17:24:15 -08:00
Marc Blank
3ef6b0493e Merge "Handle Exchange meeting invitation responses" 2010-01-26 09:29:05 -08:00
Marc Blank
5de54008e5 Handle Exchange meeting invitation responses
* Includes some refactoring of internal "request" code in SyncManager
* Adds Message flags to tag meeting invites and cancellations
* Adds meetingResponse method in EmailService
* Hooks into Controller and MessageView UI included

Change-Id: I4c5e10bccc4b41956b94d9dfa55925e5af030939
2010-01-26 09:08:52 -08:00
Mihai Preda
e3e65ed919 MessageCompose: properly remove quoted text from saved draft.
Bug 2363249.
2010-01-26 17:19:49 +01:00
Andrew Stadler
468371917e IMAP ID
* Add IMAP ID command to all login sequences
* Send generic information for now
* Explicitly catch & discard parsing errors, since we really don't
  care if the command succeeds or not.
* Unit tests

Bug: 2332183
2010-01-25 18:40:45 -08:00
Mihai Preda
def85b1ce4 Merge "MessageCompose: show account name in title." 2010-01-22 03:45:01 -08:00
The Android Open Source Project
08d92ebf47 merge from open-source master 2010-01-21 13:19:17 -08:00
Andrew Stadler
fc8d943a82 Add security column to Account
* Upgrade accounts table to add security column
* Read/Write new column
* Backup/Restore new column
* Unit tests for all of the above
* First cut at defining bitfields (non-binding, just putting down ideas)

Bug: 2387961
2010-01-21 11:48:02 -08:00
Patrick Horn
2517a3dfd1 Trim the mime type portion of Content-Type.
Fixes parsing of Content-Type headers like "text/plain ; charset=iso-8859-1"
Added unit tests for whitespace and the charset parameter
2010-01-21 11:46:20 -08:00
Mike Lockwood
87a520d7b9 Use default values rather than hard coding green for LED notification color.
Change-Id: Id192ea4d34725abf9ce892bc24e5c8562215f3e3
BUG: 2329568

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-21 11:20:23 -05:00
Mihai Preda
f9623b9e78 MessageCompose: show account name in title.
Bug 2338152.
2010-01-21 14:47:18 +01:00
Andrew Stadler
6605152908 am 346a0cc1: Backup/Restore accounts - bugfix - DO NOT MERGE
Merge commit '346a0cc1e00fcfde05df66eb37433172c96b1c36' into eclair-plus-aosp

* commit '346a0cc1e00fcfde05df66eb37433172c96b1c36':
  Backup/Restore accounts - bugfix - DO NOT MERGE
2010-01-20 18:29:43 -08:00
Andrew Stadler
346a0cc1e0 Backup/Restore accounts - bugfix - DO NOT MERGE
* Followup to 85d765f4
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
  a new account is initialized.  Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments

Cherry-picked from master d612717340
2010-01-20 17:24:33 -08:00
Andrew Stadler
d612717340 Backup/Restore accounts - bugfix
* Followup to 5e91cccd
* Workaround for (HTC bug: 2275383) & (Moto bug: 2226582)
* Restores mSyncKey as null instead of empty string, which is how
  a new account is initialized.  Bug: 2385980
* Cleanup synchronized logic in backup & restore
* Minor cleanups & improved comments
2010-01-20 16:52:12 -08:00
Andrew Stadler
d3998ebe4e am 85d765f4: Quick backup/restore of accounts DO NOT MERGE
Merge commit '85d765f41c20e6efb3b120055eb4f1efae166e8b' into eclair-plus-aosp

* commit '85d765f41c20e6efb3b120055eb4f1efae166e8b':
  Quick backup/restore of accounts DO NOT MERGE
2010-01-20 11:25:28 -08:00
Andrew Stadler
85d765f41c Quick backup/restore of accounts DO NOT MERGE
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
  some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done:  testing of EAS/Account Manager interface (this will require
  deeper dependency injection, to avoid the embedded calls to the Account
  Manager and other system services.)

Cherry-picked from master 5e91cccd4b
2010-01-20 11:05:02 -08:00
Andrew Stadler
5e91cccd4b Quick backup/restore of accounts
* Workaround for (HTC bug 2275383) & (Moto bug 2226582)
* Adds checkpoints for backing up and restoring accounts
* Uses legacy Account / prefs to back up accounts - this is because
  some of this code will be reused for legacy account migration
* Unit tests of Account & LegacyConversions
* Unit tests of backup & restore
* Not done:  testing of EAS/Account Manager interface (this will require
  deeper dependency injection, to avoid the embedded calls to the Account
  Manager and other system services.)
2010-01-20 01:36:01 -08:00
Satoshi Kataoka
950f6c65dd Merge "Fix bugs rerated to updateMailboxRefreshTime" 2010-01-19 14:42:26 -08:00
Marc Blank
0b8b68cbeb Fix account creation race condition
* Due to the order in which account creation occurs in the Provider
  and in AccountManager, and the fact that there are data observers
  on each that initiate account reconciliation, a race condition exists
  that can cause either of these accounts to appear to be orphaned,
  and thereby get deleted
* We add an "incomplete" flag to the Account in EmailProvider and
  set/clear it during account creation.  The various reconciliation
  methods will ignore accounts marked as incomplete.

Bug: 2353755
Change-Id: I13fb144dd857f839eb3471b01f271f3a0d4d8159
2010-01-19 13:07:49 -08:00
Marc Blank
74724af62c Fix autodiscover when attempted with Exchange 2003 server
* Make sure 403 error in autodiscover isn't treated as an auth error
  (401 is used for that)
* Make non-auth errors in autodiscover fail silently (and move user
  to manual setup)

Bug: 2374302
Change-Id: I4699bff70cf5ec4a513e6443e4817543c2ab2cef
2010-01-15 15:36:34 -08:00
satok
0f4efcd483 Fix bugs rerated to updateMailboxRefreshTime
BUG: 2131243

- change the parameter updateMailboxRefreshTime in MailboxList
- add updateMailboxRefreshTime to MailboxList
2010-01-16 04:36:11 +09:00
Marc Blank
9d82553b34 Merge "Implement Autodiscover for Exchange servers" 2010-01-13 17:12:26 -08:00
Marc Blank
17da1767e3 Implement Autodiscover for Exchange servers
* Autodiscover allows complete configuration using only email address
  and password
* Code handles the two standard autodiscover addresses and redirect
* Autodiscover process starts when the user chooses "Exchange" as the
  account type.  If the account is created via the AccountManager,
  autodiscover begins upon tapping "Next" for the first time
* If autodiscover fails due to anything other than auth failure for
  autodiscover-capable servers, the user is placed into the standard manual
  configuration screen

Bug: 2366019
Change-Id: I936712b924833d9a133e8da04e11c3ba45d92f92
2010-01-13 17:11:49 -08:00
Makoto Onuki
08f9bfe831 unbundle: Moving DomainNameChecker to android common. 2010-01-11 14:56:54 -08:00
Marc Blank
80eb4fd0fe am d1c56ea1: Ensure protocol version always set in sync services DO NOT MERGE
Merge commit 'd1c56ea144fb3e91ad1fdf8bba4c57531ec9cc18' into eclair-plus-aosp

* commit 'd1c56ea144fb3e91ad1fdf8bba4c57531ec9cc18':
  Ensure protocol version always set in sync services DO NOT MERGE
2010-01-10 19:34:21 -08:00
Marc Blank
d1c56ea144 Ensure protocol version always set in sync services DO NOT MERGE
* A recent change caused an issue in which protocolVersion could
  be null, resulting in an NPE
* Ensure that protocolVersion is always set to a valid version,
  defaulting to 2.5

Change-Id: Ifba6c8089fdbd93dffe38ab9895cfd3e994e29d0
Bug: 2353859
2010-01-08 14:34:21 -08:00
Makoto Onuki
63ba69d5d0 Merge "Move stub logging classes to org.apache.james.mime4j" 2010-01-08 10:32:50 -08:00
Marc Blank
0f2e1a8009 Merge "Make sure protocol version is always set in sync services" 2010-01-08 09:20:59 -08:00
Marc Blank
2cb9c55f3b Add new tests for Email sync parsing
Change-Id: Ib3be60b5f439f79f62f62eff607673e34c75506d
2010-01-07 20:27:39 -08:00
Makoto Onuki
a31cb777eb Move stub logging classes to org.apache.james.mime4j 2010-01-07 16:56:43 -08:00
Marc Blank
89ab89dd83 Make sure protocol version is always set in sync services
* A recent change caused an issue in which protocolVersion could
  be null, resulting in an NPE
* Ensure that protocolVersion is always set to a valid version,
  defaulting to 2.5

Bug: 2353859
Change-Id: I6e07ba3df5362c988658e401bebc1776a6780876
2010-01-07 11:59:57 -08:00
Makoto Onuki
fc59359db5 Unbundle: Remove the use of internal SSL APIs.
1. Replaced SSLContextImpl with SSLContext with TLS.  (They're the same, according to crazybob)
2. Copied SSLSocketFactory from org.apache.http.conn.ssl, so that we can use the hidden costructor.  (Which wasn't in the original code -- it was added by the android team, which is why it's hidden.)
2010-01-05 16:57:17 -08:00
Makoto Onuki
f39e5f38eb Unbundling: Get rid of the reference to the hidden field.
Remove the reference to CursorAdapter.mDataValid.
2010-01-04 17:13:09 -08:00
Marc Blank
86919853f7 am e83d0d64: am bb12286f: Merge change Ie25ac73d into eclair-mr2
Merge commit 'e83d0d640e9964500097571d9dea4993e5609123'

* commit 'e83d0d640e9964500097571d9dea4993e5609123':
  Fix "back key" flow for Email account setup
2009-12-22 11:25:58 -08:00
Android (Google) Code Review
bb12286f28 Merge change Ie25ac73d into eclair-mr2
* changes:
  Fix "back key" flow for Email account setup
2009-12-22 11:21:15 -08:00
Mihai Preda
0de7377985 am 78f609db: am af1bf487: MessageView: upon delete move to older instead of newer.
Merge commit '78f609db56500c01f75ea2d8742468907255f7ba'

* commit '78f609db56500c01f75ea2d8742468907255f7ba':
  MessageView: upon delete move to older instead of newer.
2009-12-22 10:15:58 -08:00
Mihai Preda
1e1bb40062 am 9d024a5b: am 2b6dfc97: Merge change I55f52567 into eclair-mr2
Merge commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8'

* commit '9d024a5b4f42d9d7687d06e5f86f9c68f22fccf8':
  MessageCompose: fix NPE cased by WebView set to null in onDestroy().
2009-12-22 10:15:53 -08:00
Mihai Preda
af1bf48773 MessageView: upon delete move to older instead of newer.
Bug 2233586
2009-12-22 15:16:14 +01:00
Android (Google) Code Review
2b6dfc9796 Merge change I55f52567 into eclair-mr2
* changes:
  MessageCompose: fix NPE cased by WebView set to null in onDestroy().
2009-12-22 05:19:44 -08:00
Makoto Onuki
ec82f9d7c0 email unbundling: get rid of the write access to the CursorAdapter.mDataValid.
MessageListAdapter.doRequery() is supporsed to do the same thing as CursorAdapter.onContentChanged() does.  So the entire method body can be replaced with super.onContentChanged().
2009-12-21 15:30:42 -08:00
Marc Blank
4b31f3c7a6 am 27051e48: Merge change Ife6689fa into eclair
Merge commit '27051e480f9cc5396aacc3cc5e520d5875390548' into eclair-plus-aosp

* commit '27051e480f9cc5396aacc3cc5e520d5875390548':
  Use correct EAS version in Outbox (fixes #2319892) DO NOT MERGE
2009-12-21 11:48:22 -08:00
Marc Blank
420f664891 am bfc5de35: Merge change I06d98e54 into eclair
Merge commit 'bfc5de35fa08b6e747e5d5afe72bffafca08ce2a' into eclair-plus-aosp

* commit 'bfc5de35fa08b6e747e5d5afe72bffafca08ce2a':
  Fix delay sending mail after tapping "Send outgoing mail" DO NOT MERGE
2009-12-21 11:48:18 -08:00
Marc Blank
c76a22b01a am c874824c: Merge change Iad377728 into eclair
Merge commit 'c874824ca8b76f795575538ffa34138e2de47cad' into eclair-plus-aosp

* commit 'c874824ca8b76f795575538ffa34138e2de47cad':
  Don't delete referenced messages from the Exchange server DO NOT MERGE
2009-12-21 11:48:14 -08:00
Android (Google) Code Review
27051e480f Merge change Ife6689fa into eclair
* changes:
  Use correct EAS version in Outbox (fixes #2319892) DO NOT MERGE
2009-12-21 11:42:09 -08:00
Android (Google) Code Review
bfc5de35fa Merge change I06d98e54 into eclair
* changes:
  Fix delay sending mail after tapping "Send outgoing mail" DO NOT MERGE
2009-12-21 11:41:24 -08:00
Marc Blank
f1efd65a5e Fix "back key" flow for Email account setup
* The existing flow is badly broken; every "back" causes the user
  to leave the setup flow and therefore have to start from scratch.
  This is a very bad user experience, as previously entered data is
  lost and must be re-entered.
* The fix corrects these problems, allowing the user to back up
  through screens UNTIL the account is successfully created.
* After account creation, the user is returned to the proper screen,
  depending on whether we're in "eas flow mode" or not

Bug: 2337511
Change-Id: Ie25ac73dfcd8a1dca36e1b31c75ffb22359840d1
2009-12-21 11:28:53 -08:00
Marc Blank
320a065b6b am 719610ab: am 42e5dca4: Add sanity checks in SyncManager and EasSyncService
Merge commit '719610ab8faee6a0c0ed4ff748cd1eeec3459fa6'

* commit '719610ab8faee6a0c0ed4ff748cd1eeec3459fa6':
  Add sanity checks in SyncManager and EasSyncService
2009-12-18 16:50:58 -08:00
Makoto Onuki
03e9e2d886 Fix typo 2009-12-18 16:36:44 -08:00
Marc Blank
42e5dca4ef Add sanity checks in SyncManager and EasSyncService
* Prevent possible NPE's

Change-Id: I2b3c747609c6a87ec6060fd59006f2912dfcc591
2009-12-18 13:54:53 -08:00
Makoto Onuki
425fd30a9c Email unbundling: Use accessor for CursorAdapter.mCursor and ListActivity.getListView().
Also added a todo for ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS.
2009-12-18 13:26:04 -08:00
Android (Google) Code Review
99bfd7e9b7 Merge change Ibf071fa6
* changes:
  Unbundling email: Make Base64 hidden API free.
2009-12-17 10:25:05 -08:00
Makoto Onuki
bf071fa625 Unbundling email: Make Base64 hidden API free.
Seems like it's the simplest way to make it.
- Base64 no longer implements BinaryEncoder/Decoder.  Email app doesn't use them.
- Copied Decoder/EncoderException.  Email app doesn't catch them either.
2009-12-16 16:59:00 -08:00
Makoto Onuki
22a4e0ddbf Unbundling email: Stub out apache logging. (See b/2226160)
Let me know if you don't like the package name.
2009-12-16 16:44:10 -08:00
Marc Blank
608ca667b2 Don't delete referenced messages from the Exchange server DO NOT MERGE
* Addresses #2287439 incompletely
* The most likely reason for a reply/forward to get stuck in the Outbox
  is that the referenced message has been deleted from the client, with
  the deletion occuring BEFORE the message gets sent (currently, the two
  are completely independent)
* This change causes deletes NOT to be sent to the server if the message
  to be deleted is referenced by an outgoing message

Change-Id: Iad3777282385bea82276f363d6f95ba8b07cc01c
2009-12-16 12:01:08 -08:00
Marc Blank
23a1cfc8a8 Fix delay sending mail after tapping "Send outgoing mail" DO NOT MERGE
* Fixes #2317429
* When "Send outgoing messages" is tapped in Outbox MessageList view,
  we clear the error state for all "stuck" messages
* We didn't, however, clear the error state of the Mailbox, which doesn't
  clear itself until the end of a pingLoop, which can be up to 30 minutes
* The fix is in two parts:
  * We clear the error state of the Outbox when a sync is requested by
    the UI
  * We don't set the error state of the mailbox for non-auth errors when
    sending, because we don't want to block OTHER messages from getting sent.

Change-Id: I06d98e54049b01c2156b1bc3ebbccf043e7b93f5
2009-12-16 11:57:58 -08:00
Marc Blank
21d077e60b Use correct EAS version in Outbox (fixes #2319892) DO NOT MERGE
* We inadvertently failed to set the EAS version in EasOutboxService,
  so the default of 2.5 is used
* This works, but SmartReply/SmartForward were enhanced in 12.0 and we
  aren't taking advantage of those changes
* The fix is to set the version using common code

Change-Id: Ife6689fa9934da42d98a48df74fca90ba6d1718c
2009-12-16 11:54:46 -08:00
Mihai Preda
55f5256761 MessageCompose: fix NPE cased by WebView set to null in onDestroy().
Bug 2329276.
2009-12-16 18:12:34 +01:00
Android (Google) Code Review
ec3daeedb3 Merge change I783790b6 into eclair-mr2
* changes:
  Check null pointer in MessageList
2009-12-16 00:03:03 -08:00
satok
9151d86e68 Check null pointer in MessageList
BUG: 2299971
2009-12-16 16:26:20 +09:00
Marc Blank
4a7a50f6a6 Fix potential NPE in earlier CL
* Noted this problem in reviewing a newer CL
* Fix is to add a check in setupService

Change-Id: Ia4d71365f8036aac8bf531b835b184dabfbc06fa
2009-12-14 17:17:30 -08:00
Android (Google) Code Review
d2481f95f2 Merge change I768138b6 into eclair-mr2
* changes:
  Fix delay sending stuck mail after tapping "Send outgoing mail"
2009-12-11 15:49:28 -08:00
Android (Google) Code Review
4848aa2a1f Merge change I9a3d501a into eclair-mr2
* changes:
  Run MailboxAlarmReceiver's code in a background thread
2009-12-11 13:06:44 -08:00
Marc Blank
079589641a Run MailboxAlarmReceiver's code in a background thread
* Fixes 2313077
* Broadcast receivers are run in the UI thread, so we must ensure that
  any long-running code is executed in a background thread

Change-Id: I9a3d501a308445a84a1baa99fc6abb9feb56ff2d
2009-12-11 13:05:48 -08:00
Marc Blank
caf5644360 Fix delay sending stuck mail after tapping "Send outgoing mail"
* Fixes #2317429
* When "Send outgoing messages" is tapped in Outbox MessageList view,
  we clear the error state for all "stuck" messages
* We didn't, however, clear the error state of the Mailbox, which doesn't
  clear itself until the end of a pingLoop, which can be up to 30 minutes
* The fix is in two parts:
  * We clear the error state of the Outbox when a sync is requested by
    the UI
  * We don't set the error state of the mailbox for non-auth errors when
    sending, because we don't want to block OTHER messages from getting sent.

Change-Id: I768138b6f31eb696811aa94f621b6fa758ec1a5e
2009-12-11 10:07:17 -08:00
Android (Google) Code Review
9b83870a09 Merge change I3b505448 into eclair-mr2
* changes:
  Use correct EAS protocol version in Outbox (fixes #2319892)
2009-12-11 09:28:36 -08:00
Android (Google) Code Review
e312c12b74 Merge change I356b8bfa into eclair-mr2
* changes:
  Deal with mismatch between our accounts and AccountManager accounts
2009-12-11 09:05:16 -08:00
Marc Blank
423680653a Deal with mismatch between our accounts and AccountManager accounts
* Addresses #2226426
* Recognize the case in which there is no EmailProvider Account corresponding
  to an AccountManager account (the case being addressed is that of the
  EmailProvider database being deleted due to corruption
* In this case, delete the AccountManager account so that the two are in
  sync
* Refactor and add unit test for account reconciliation

Change-Id: I356b8bfaa0846f85223cc15994b750df207a63ea
2009-12-11 09:04:26 -08:00
Marc Blank
ec2d0e41b7 Use correct EAS protocol version in Outbox (fixes #2319892)
* We inadvertently failed to set the EAS version in EasOutboxService,
  so the default of 2.5 is used
* This works, but SmartReply/SmartForward were enhanced in 12.0 and we
  aren't taking advantage of those changes
* The fix is to set the version using common code

Change-Id: I3b505448003f340681deeb8fb22e61e9dd8d10a0
2009-12-10 14:11:23 -08:00
Android (Google) Code Review
3c1334ae1f Merge change I915b13a6 into eclair-mr2
* changes:
  Fix MessageListUnitTests
2009-12-09 17:44:48 -08:00
Fred Quintana
052eefe406 changed to use the new EntityIterator interface 2009-12-09 10:30:58 -08:00
Android (Google) Code Review
7a4b1c72f6 Merge change I146f63ab into eclair-mr2
* changes:
  Don't delete referenced messages from the Exchange server
2009-12-07 21:31:42 -08:00
Marc Blank
c29e435eb3 Don't delete referenced messages from the Exchange server
* Addresses #2287439 incompletely
* The most likely reason for a reply/forward to get stuck in the Outbox
  is that the referenced message has been deleted from the client, with
  the deletion occuring BEFORE the message gets sent (currently, the two
  are completely independent)
* This change causes deletes NOT to be sent to the server if the message
  to be deleted is referenced by an outgoing message

Change-Id: I146f63ab345c07e684790e1d7d1fc08870468bbf
2009-12-07 21:30:59 -08:00
Marc Blank
0e1595c177 Handle unexpected deletion of EmailProvider database
* Addresses #2226426
* If the user deletes Email data, or if data corruption causes
  EmailProvider.db to be deleted, we will be in an inconsistent
  state with any existing Exchange accounts, since the AccountManager
  will still know about them, contacts (and eventually calendar) items will
  continue to exist, etc.
* Run an integrity check when the provider is created, deleting any
  orphaned EmailProvider.db or EmailProviderBody.db
* Catch SQLiteException's in the Provider and do an integrity check
  if any is caught

Change-Id: I47d523b90a6b8f71ba8e13fba4b04846b3da1b1d
2009-12-07 21:12:57 -08:00
satok
3d00377b35 Fix MessageListUnitTests
This is supperement of change,33265

* Move custom cursor to inner static class
* Change public to /* package */
* Move PROJECTION to a package
2009-12-08 13:36:32 +09:00
Android (Google) Code Review
ecfc9e92e5 Merge change Icba56688 into eclair-mr2
* changes:
  Ensure that service calls run outside the UI thread (#2235734)
2009-12-07 19:00:02 -08:00
Android (Google) Code Review
3af9f4cbf3 Merge change I9bec1244 into eclair-mr2
* changes:
  Fix #2300147 (mistakenly reporting connection error)
2009-12-07 10:19:23 -08:00
Vasu Nori
b720ed3183 revert previously submitted CL 34143.
turns out the change I submitted before is not required at all. I mistakenly
assumed sqlite wouldn't be able to handle it. but tested it with the latest
version of sqlite 3.6.20. the old style triggers work fine.
2009-12-03 18:32:58 -08:00
Marc Blank
d3da948c31 Fix #2300147 (mistakenly reporting connection error)
* When a mailbox sync is stopped intentionally (for example, if account
  settings change), we report a connection error by mistake
* Handle this case properly, reporting "success" (i.e. no error state)
* Remove obsolete comment

Change-Id: I9bec1244267cd2240c369b9b7f905948381a0f91
2009-12-03 09:58:56 -08:00
Marc Blank
3379c51569 Ensure that service calls run outside the UI thread (#2235734)
Change-Id: Icba566884f3b994c8a4ccc4b8658c40b133a3509
2009-12-02 15:01:06 -08:00
Android (Google) Code Review
98796942ea Merge change I8e09bde5 into eclair-mr2
* changes:
  change BEFORE triggers to AFTER triggers - to make them work with sqlite 3.6.20 and beyond
2009-12-02 14:42:46 -08:00
satok
4cb25d93a2 Save the state of checkboxes when orientation is changed
BUG: 2239516

* Add tests for save/restore Instance State
2009-12-01 15:41:10 +09:00
Vasu Nori
8e09bde568 change BEFORE triggers to AFTER triggers - to make them work with sqlite 3.6.20 and beyond 2009-11-25 15:38:42 -08:00
Jean-Baptiste Queru
ee0c01548e merge from open-source master 2009-11-24 09:12:36 -08:00
Android (Google) Code Review
d457c744cd Merge change Ic1a2e5b9 into eclair
* changes:
  Fix improper constant to allow retry for sending Exchange mail
2009-11-20 13:32:59 -08:00
Marc Blank
eec04663fe Fix improper constant to allow retry for sending Exchange mail
* Related to MR1 triaged bug 2274389 in which mail was stuck in the
  Outbox and wouldn't send
* It turns out an improper constant was being used in the SQL code
  for turning off the "error" state flag

Change-Id: Ic1a2e5b9dd34ec3f9d7da0b3d2cd63d77bb7681e
2009-11-20 12:10:23 -08:00
Marc Blank
6ba40085d7 am 863e6c40: Handle "send outgoing messages" properly for combined Outbox
Merge commit '863e6c40202fe804d92a263809da74ec1e904e66' into eclair-mr2

* commit '863e6c40202fe804d92a263809da74ec1e904e66':
  Handle "send outgoing messages" properly for combined Outbox
2009-11-20 09:56:03 -08:00
Marc Blank
863e6c4020 Handle "send outgoing messages" properly for combined Outbox
* The "send outgoing messages" button doesn't work in the combined
  inbox (the case wasn't handled)
* Add code to loop through accounts, calling the Controller for each
  in this case
* Fixes (partially or completely) #2274389

Change-Id: I94e984247d43f93a4d6546b8c10f6ce149b091be
2009-11-20 09:46:35 -08:00
Marc Blank
bdb28c1644 Fix #2267475 (NPE when changing incoming settings for EAS)
* When settings are changed, we loop through the sync error map,
  clearing mailboxes in the changed account that are in an error
  state.
* It's possible that there are mailboxes referenced in the map that
  no longer exist.  When trying to retrieve them from the provider,
  null is returned, but we're not checking for this case, and an
  NPE results.
* The fix is simply to check for null, and clear the error map for
  the mailboxId that references a deleted mailbox

Change-Id: I8c1c847090026fa1c53b09bbe6b12d864bce4df1
2009-11-19 09:01:06 -08:00
Android (Google) Code Review
6b93f61eea Merge change Ib35bb866 into eclair-mr2
* changes:
  Don't allow "trash" to be synced (Fixes #2116463)
2009-11-19 08:57:39 -08:00
Marc Blank
6daaf76459 Don't allow "trash" to be synced (Fixes #2116463)
Change-Id: Ib35bb86641b473194fea32b55db328a44de1c67b
2009-11-18 17:20:44 -08:00
Dan Egnor
2da2e4632d Change android.text.util.Regex to com.android.common.Patterns 2009-11-18 12:11:55 -08:00
Elliott Hughes
5e062514bf Move the org.kxml2.wap.Wbxml class into the EAS code, the only user.
(I notice that you already have, for example, an END constant, but with
a different value. Bug?)

Bug: 2249953
2009-11-17 15:10:40 -08:00
Elliott Hughes
b1487a2030 DO NOT MERGE: Back-port 2249953 fix (for email unbundling).
Original check-in comment:
Move the org.kxml2.wap.Wbxml class into the EAS code, the only user.

Dr No approval: danfuzz
2009-11-16 13:26:18 -08:00
Jean-Baptiste Queru
56e48981f0 eclair snapshot 2009-11-12 18:46:09 -08:00
Marc Blank
83b67e6198 Fix #2251837; better response w/ security req'd. DO NOT MERGE
* Currently, we validate EAS accounts using a command that will
  succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
  when trying to sync with a validated account in the case that
  there are, in fact, required policies
* The fix is to send a sync command after validating the user name
  and password; a 403 error indicates the requirement for
  security policies.
* When we see the 403 error, we put up a message that is appropriate
  to the situation.

Change-Id: I74e132cb81f021cbb697cc9ee146405bf3ebc0ba
2009-11-11 14:40:35 -08:00
Marc Blank
29935abb1c Fix #2251837; better response when provisioning is required.
* Currently, we validate EAS accounts using a command that will
  succeed even if we do not support required security policies.
* This causes a confusing "invalid username or password" error
  when trying to sync with a validated account in the case that
  there are, in fact, required policies
* The fix is to send a sync command after validating the user name
  and password; a 403 error indicates the requirement for
  security policies.
* When we see the 403 error, we put up a message that is appropriate
  to the situation.

Change-Id: Ic40820253dca1f357297b2355ad987bc39d0775f
2009-11-10 16:29:10 -08:00
Marc Blank
151ebde5d1 Allow sync data via the chunked transfer encoding DO NOT MERGE
* Fixes #2216885
* The bug is that the sync adapters weren't set up to handle chunked
  encoding, primarily because 1) I hadn't seen any servers use it, and
  2) when we changed from HttpUrlConnection to HttpClient, support for
  chunked wasn't added (HttpUrlConnection didn't support it)
* The fix for xml data is trivial, since the Content-Length returned in
  the chunked case (-1) was being disallowed, but works perfectly well
  with HttpClient.
* The fix for attachments is less trivial, but still straightforward.
* With this change, we are no longer dependent on receiving content-length,
  which is highly desirable

Change-Id: I8d46790e41eaeee2887c8a207006c5d6786498ed
2009-11-04 18:11:24 -08:00
Marc Blank
038be0fc4d am c5ec3d0b: Merge change I2eee4ddc into eclair
Merge commit 'c5ec3d0bce03de10c4bb1bc5cf013494c6d62947' into eclair-mr2

* commit 'c5ec3d0bce03de10c4bb1bc5cf013494c6d62947':
  Improved fix for #2189704 (sync loss)
2009-11-04 14:53:35 -08:00
Android (Google) Code Review
c5ec3d0bce Merge change I2eee4ddc into eclair
* changes:
  Improved fix for #2189704 (sync loss)
2009-11-04 17:45:11 -05:00
Marc Blank
d676ab6a98 Improved fix for #2189704 (sync loss)
* The prior fix prevented looping in the case that a new sync key wasn't
  received.
* Unfortunately, the prior fix tested for the looping condition (moreAvailable)
  before it would have been set.
* The correct fix is to detect the looping condition after both the sync key
  and the moreAvailable flag are guaranteed to have been set

Change-Id: I2eee4ddc123fb2a5ce4ef3bd4e7d0614fcfbdf36
2009-11-03 18:11:02 -08:00
Marc Blank
ccd29c33ed Allow sync data to arrive via the chunked transfer encoding.
* Fixes #2216885
* The bug is that the sync adapters weren't set up to handle chunked
  encoding, primarily because 1) I hadn't seen any servers use it, and
  2) when we changed from HttpUrlConnection to HttpClient, support for
  chunked wasn't added (HttpUrlConnection didn't support it)
* The fix for xml data is trivial, since the Content-Length returned in
  the chunked case (-1) was being disallowed, but works perfectly well
  with HttpClient.
* The fix for attachments is less trivial, but still straightforward.
* With this change, we are no longer dependent on receiving content-length,
  which is highly desirable

Change-Id: Ie3bd6af0cf68f3afa190711d96b1dbd2e6341f79
2009-11-01 13:48:31 -08:00
Marc Blank
e7965e975f am 1e1d7cb1: Merge change Ie2804ddc into eclair
Merge commit '1e1d7cb189e7ea7164d1335539d68d3d3ca8c0e5' into eclair-mr2

* commit '1e1d7cb189e7ea7164d1335539d68d3d3ca8c0e5':
  Fix #2225869 (Regression in attachment loading / Exchange 2003)
2009-10-30 14:33:58 -07:00
Android (Google) Code Review
1e1d7cb189 Merge change Ie2804ddc into eclair
* changes:
  Fix #2225869 (Regression in attachment loading / Exchange 2003)
2009-10-30 17:26:46 -04:00
Android (Google) Code Review
68942b93a4 Merge change I9733dc5d into eclair
* changes:
  Fix folder deletion; support folder rename (#2118439) DO NOT MERGE
2009-10-30 13:54:55 -04:00
Marc Blank
05dfc20853 Fix #2225869 (Regression in attachment loading / Exchange 2003)
* The fix to bug #2191778 inadvertently broke attachment loading for
  Exchange 2003 servers; the server responds with a 403 error (indicating
  an authentication issue)
* All other communications with the server work properly
* We use a slightly different set of calls in the case of attachments (we
  wanted to change as little as possible in the fix to #2191778) than we
  do in the other cases
* The fix here is to use the same calling sequence for attachments that we
  use elsewhere
* This fix has been observed to work on multiple servers, and in various
  SSL scenarios (on/off, trusted/untrusted)

Change-Id: Ie2804ddcbfa2b10edff42f7a3811734c325e933d
2009-10-29 20:10:46 -07:00
Marc Blank
94d2e99581 Fix folder deletion; support folder rename (#2118439) DO NOT MERGE
* Folder delete had a subtle error that could cause subsequent folder
  changes in the same sync to fail (using wrong end tag)
* Folder change (rename, move) wasn't implemented; this was added and
  tested.  The change is very straightforward and low risk.

Change-Id: I9733dc5da1a535c388e2feb299a641642ba531c2
2009-10-29 12:19:57 -07:00
Android (Google) Code Review
0911d6290f Merge change Id69cee9b into eclair-mr2
* changes:
  Fix folder deletion; add support for folder rename (#2118439)
2009-10-29 15:06:56 -04:00
Marc Blank
d2cc832782 Fix folder deletion; add support for folder rename (#2118439)
* Folder delete had a subtle error that could cause subsequent folder
  changes in the same sync to fail (using wrong end tag)
* Folder change (rename, move) wasn't implemented; this was added and
  tested.  The change is very straightforward and low risk.

Change-Id: Id69cee9b99e9a988a176a6525ba9a1615b741c44
2009-10-29 12:03:39 -07:00
Android (Google) Code Review
9abd1bf9da Merge change I21052e28 into eclair-mr2
* changes:
  Controller: modify the test for "attachment already loaded".
2009-10-29 09:34:43 -04:00
Mihai Preda
6bb7c7248a MessageView: disable reply&forward for Trash messages.
Bug 2170118
2009-10-29 14:11:10 +01:00
Android (Google) Code Review
0054c1a9e6 Merge change If12d0e7c into eclair
* changes:
  Go to combined inbox on notify for 2+ accounts (#2147265) DO NOT MERGE
2009-10-28 13:56:10 -04:00
Android (Google) Code Review
2533132c84 Merge change Ic29d3eac into eclair
* changes:
  Server validates even though server address is wrong DO NOT MERGE
2009-10-28 13:55:43 -04:00
Marc Blank
5d4bb79044 Go to combined inbox on notify for 2+ accounts (#2147265) DO NOT MERGE
* The problem is that PendingIntents aren't updated when a notification
  is updated, so the changed extras when a 2nd account gets a new message
  aren't seen by MessageList when it's started up upon tapping the
  notification (it uses the extras from the 1st account to get a new
  message)
* The fix is to use the newish (cupcake) flag in the PendingIntent that
  causes the extras in the PendingIntent to be updated

Change-Id: If12d0e7c6d3f256befeca98b560443395820737f
2009-10-28 08:57:45 -07:00
Marc Blank
e53de6985a Server validates even though server address is wrong DO NOT MERGE
* Fixes #2173664
* Make sure that not only is the OPTIONS command accepted, but that
  the server reports EAS versions and commands

Change-Id: Ic29d3eacfdc54d107600afc443964a1e8b3d5e59
2009-10-28 08:53:57 -07:00
Marc Blank
ea5b93d9b8 Handle moreAvailable true w/o changes (#2189704) DO NOT MERGE
* An Exchange log from Moto has shown sync behavior in which moreAvailable
  is set to true even though there are no changes in the sync response
  (i.e. the SyncKey is unchanged)
* This leads to long-lived looping which impacts battery life
* The fix is to recognize the behavior and prevent looping by
  setting moreAvailable = false

Change-Id: Icf45efbc24331c874c820b7b177e39b16df445d8
2009-10-22 14:49:26 -07:00
Mihai Preda
9ef6f645f5 Controller: modify the test for "attachment already loaded".
Bug 2192510.

update unit test.
2009-10-22 19:27:59 +02:00
Android (Google) Code Review
da08e3bcb6 Merge change I218079f2 into eclair-mr2
* changes:
  Fix timing-dependent crash in Medium tests (#2202726)
2009-10-21 18:44:47 -04:00
Marc Blank
d16b4b921f Go to combined inbox from notification for 2+ accounts (#2147265)
* The problem is that PendingIntents aren't updated when a notification
  is updated, so the changed extras when a 2nd account gets a new message
  aren't seen by MessageList when it's started up upon tapping the
  notification (it uses the extras from the 1st account to get a new
  message)
* The fix is to use the newish (cupcake) flag in the PendingIntent that
  causes the extras in the PendingIntent to be updated

Change-Id: Ia4ab14954b2c1413526016975216b2516372f2aa
2009-10-21 13:51:16 -07:00
Marc Blank
38203a3fde Fix timing-dependent crash in Medium tests (#2202726)
Change-Id: I218079f24f1ce08d770624d1272e1d9a46c1be26
2009-10-21 12:41:57 -07:00
satok
3045bb967f Add view of all counts in AccountFolderList
BUG: 2201097
2009-10-21 07:19:10 +09:00
Android (Google) Code Review
528fa1bbca Merge change Icabbe5fe into eclair-mr2
* changes:
  Fix #2159410 (side-effect of unexpected account deletion)
2009-10-20 15:01:54 -04:00
Marc Blank
c1b8efad50 Fix #2159410 (side-effect of unexpected account deletion)
Change-Id: Icabbe5fe5c417ff72b542eff7a54c658814d482b
2009-10-20 10:51:08 -07:00
Marc Blank
367963639d Fix SQL for upgrade from ver 6 to ver 7 of Email database
Fixes #2196917

Change-Id: Ia403e50e9ec4ea553d38ded656bba769a4a4dd18
2009-10-20 10:11:26 -07:00
satok
4bc81bb286 Fix build breakage 2009-10-20 04:19:21 +09:00
Android (Google) Code Review
ba78d18f59 Merge change I23b7f225 into eclair-mr2
* changes:
  Clean up appearance of unread counters
2009-10-19 14:20:01 -04:00
satok
fa368b50d6 Clean up appearance of unread counters
BUG: 2161746
2009-10-20 03:18:27 +09:00
Marc Blank
3a88e2c35c am 55a97fc3: Fix attachment loading with "accept certificates" checked
Merge commit '55a97fc360ac549631af3aa3aad9833812674562' into eclair-mr2

* commit '55a97fc360ac549631af3aa3aad9833812674562':
  Fix attachment loading with "accept certificates" checked
2009-10-19 10:40:15 -07:00
Marc Blank
55a97fc360 Fix attachment loading with "accept certificates" checked
* Fixes #2191778 (P1/S1)
* Attachment retrieval wasn't using newer code to create its
  HttpClient.
* Fix is simple, extremely safe

Change-Id: I65be27decae8719bbad8ac7dce1c1164de4371a5
2009-10-19 10:34:10 -07:00
Android (Google) Code Review
dc9bc35bb1 Merge change Idef455f3 into eclair-mr2
* changes:
  Handle case of moreAvailable true with no changes (#2189704)
2009-10-15 16:28:19 -04:00
Marc Blank
288bb26ab8 Handle case of moreAvailable true with no changes (#2189704)
* An Exchange log from Moto has shown sync behavior in which moreAvailable
  is set to true even though there are no changes in the sync response
  (i.e. the SyncKey is unchanged)
* This leads to long-lived looping which impacts battery life
* The fix is to recognize the behavior and prevent looping by
  setting moreAvailable = false

Change-Id: Idef455f3e1170caf4002542ca432d128b3a19e56
2009-10-15 12:11:39 -07:00
Android (Google) Code Review
f095e9df5a Merge change Ib53e4411 into eclair-mr2
* changes:
  Clear out orphaned messages in updates/deletes tables
2009-10-15 15:03:41 -04:00
Marc Blank
ef83299b99 Clear out orphaned messages in updates/deletes tables
Case #1:
* Fixes #2184702
* Messages can be in the base Messages table, but also in
  Message_Deletes and Message_Updates; the latter two were not
  being purged of deleted messages.
* This CL deletes from all three tables when a Mailbox is deleted
* Also run a check for orphaned deletes/updates when the email
  provider's db is first opened
* Unit test updated to check for proper deletion
* Unit test for the provider check for orphans

Case #2:
* Fixes #2184708
* Messages in Outbox/Drafts can get modified or deleted, but the
  rows added to the updates/delete tables never get removed because
  the boxes don't sync
* Added code to SyncManager.ping (which gets notifications of these
  changes) to delete these rows

Change-Id: Ib53e441136b0da1e88bc220150d631999058a8f0
2009-10-15 10:58:00 -07:00
Mihai Preda
3afd66cda8 MessageCompose: disable "save as draft" button logic.
Bug 2184404
Disable "save as draft" button when there are no changes to be saved.
2009-10-15 12:09:38 +02:00
satok
347a44af56 Fix the bug that the count of draft and trash icons are wrong.
BUG: 2159565

* Currently only the number of unread messages is shown.
* Fixed to show the number of all messages
2009-10-15 10:01:13 +09:00
Andrew Stadler
53123c2f91 DO NOT MERGE. Prevent duplication of POP3 attachments
* For each attachment we add, check the DB for an existing attachment
  with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests

Originally fixed in 5b0a12c199 / CL I036f39c6

Fixes bug http://b/2084704
2009-10-14 12:41:05 -07:00
Android (Google) Code Review
196f6187bb Merge change I036f39c6 into eclair-mr2
* changes:
  Prevent duplication of POP3 attachments
2009-10-14 13:21:26 -04:00
Andrew Stadler
5b0a12c199 Prevent duplication of POP3 attachments
* For each attachment we add, check the DB for an existing attachment
  with similar metadata (name, mime type, content id, etc.)
* Skip adding them if already held
* Unit tests

Fixes bug http://b/2084704
2009-10-14 08:20:59 -07:00
Andrew Stadler
e3e02adac6 am dee4e253: Do not trust server-provided content type for attachments
Merge commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c' into eclair-mr2

* commit 'dee4e25320c5154a5626446e1aa37f63ae97c48c':
  Do not trust server-provided content type for attachments
2009-10-14 07:37:12 -07:00
Andrew Stadler
dee4e25320 Do not trust server-provided content type for attachments
* Fixes a bug that caused some attachments to be labeled with the
  wrong content type and thus unable to be opened by local apps.
* When the attachment code was written, MimeTypeMap had very few
  entries, so we tried to get the mime type of Exchange attachments
  from the stream when the file was read off the server.  It turns
  out that the server's idea of mime type is unpredictable
* In the meantime, MimeTypeMap has been fleshed out, so we really
  do know the type in the vast majority of cases (and including all
  common document types)
* The fix is to remove the lines related to reading the mime
  type from the attachment stream
* Content type is set (properly) when attachment record is created.  See
  EasEmailSyncParser.getMimeTypeFromFileName() for details.

Fixes bug http://b/2182955

Change-Id: Iebb3de529df4548327d7112e1dedb3bd448462a4
2009-10-13 21:09:40 -07:00
Marc Blank
7cfda60b2b am 4e424a33: Merge change Ie093215f into eclair
Merge commit '4e424a33c29446d750790e360e43fb7c83ec0c6f' into eclair-mr2

* commit '4e424a33c29446d750790e360e43fb7c83ec0c6f':
  Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
2009-10-13 14:46:04 -07:00
Android (Google) Code Review
4e424a33c2 Merge change Ie093215f into eclair
* changes:
  Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
2009-10-13 17:39:59 -04:00
Andrew Stadler
b7c67a0124 am 754240bc: Fix race condition in testMultiple()
Merge commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0' into eclair-mr2

* commit '754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0':
  Fix race condition in testMultiple()
2009-10-13 12:43:20 -07:00
Marc Blank
5fd81cad4c Add truncation at 100k (EAS 2.5) and 200k (EAS 12) (#2184807)
* Prevents OOM errors with huge message bodies

Change-Id: Ie093215f96a514b3a1bcd31aa1f5957d1ada7719
2009-10-13 12:06:47 -07:00
Andrew Stadler
754240bcf3 Fix race condition in testMultiple()
* If we close the activity while a requeryList() is pending in the
  handler queue, we'll eventually try to operate on a closed cursor
  when we get to testMultiple().
* The fix: Return immediately if the cursor is not available.

Fixes bug http://b/2180416
Followup for bug http://b/2149083
2009-10-13 12:02:46 -07:00
Mihai Preda
2bc47f24a4 MessageView: use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET when viewing attachments.
Bug 2180995.
2009-10-13 12:53:16 +02:00
Marc Blank
255dba84f1 am 2c74ee56: Prevent EmailAddressAdapter from leaking cursors; load in bg
Merge commit '2c74ee56a44e7a43bda14e88fd2b571fd88952fe' into eclair-mr2

* commit '2c74ee56a44e7a43bda14e88fd2b571fd88952fe':
  Prevent EmailAddressAdapter from leaking cursors; load in bg
2009-10-12 14:02:19 -07:00
Marc Blank
2c74ee56a4 Prevent EmailAddressAdapter from leaking cursors; load in bg
* Relates to a number of bugs related to ANR's and slow behavior
  when addressing mail
* Call changeCursor(null) on the Adapter when the activity is destroyed
* Call getCount() in the background thread to force data there rather
  than in the UI thread
* If this change is accepted, something equivalent should be
  used in the Gmail app as well
* Addresses #2180237 (P1, target Eclair_Sholes) as well as
  #2180976 and #2146926, the latter two of which were fixed
  with workarounds.

Change-Id: I7503c5fbe091dbc5e784d5a7bebeb3d60226d57d
2009-10-12 13:54:05 -07:00
Mihai Preda
89966059c9 am 1a377f09: MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there\'s no source message, to avoid duplicated email addresses on orientation change.
Merge commit '1a377f096f3a263bba536355823290db4bba7434' into eclair-mr2

* commit '1a377f096f3a263bba536355823290db4bba7434':
  MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there's no source message, to avoid duplicated email addresses on orientation change.
2009-10-12 11:42:13 -07:00
Mihai Preda
1a377f096f MessageCompose: corretly set initial mSourceMessageProcessed=true for the cases where there's no source message, to avoid duplicated email addresses on orientation change.
Bug 2180955.
2009-10-12 13:39:42 +02:00
Andrew Stadler
d5e7afa1eb Remove obsolete resources & code
* FolderMessageList
* Fat title bar (remnants)
* Drawables

Bug # http://b/2071133
2009-10-11 22:09:39 -07:00
Marc Blank
8be9b8937b am ea878be1: Make sure we hold WakeLock during mail sending (fixes #2180551)
Merge commit 'ea878be11729cd793d9183fc264118241cd5a5b6' into eclair-mr2

* commit 'ea878be11729cd793d9183fc264118241cd5a5b6':
  Make sure we hold WakeLock during mail sending (fixes #2180551)
2009-10-10 22:59:05 -07:00
Marc Blank
ea878be117 Make sure we hold WakeLock during mail sending (fixes #2180551)
* Don't runAsleep unless this is a Ping
* Relates to #2178288 in that it's possible that the system could
  sleep while we're trying to send (not sure if this is possible;
  will check), so we prevent it by holding a WakeLock in this case

Change-Id: Ib3f8786501b942e1cfcb7a0bbb07b8e3084e2a86
2009-10-10 22:54:24 -07:00
Android (Google) Code Review
0fd132d26c Merge change I5de51a43 into eclair-mr2
* changes:
  Allow photo changes to be uploaded to Exchange (fixes #2179082)
2009-10-09 21:57:55 -04:00
Marc Blank
59da135e15 Allow photo changes to be uploaded to Exchange (fixes #2179082)
Change-Id: I5de51a4313c43dbe4e3d12d4d0e11b20adedaa8f
2009-10-09 14:34:53 -07:00
Mike Cleron
4cce00d6c4 am 479b22a2: Make multiselect buttons update when the list state changes
Merge commit '479b22a2f8966b63789c89e878b615ebd53708c0' into eclair-mr2

* commit '479b22a2f8966b63789c89e878b615ebd53708c0':
  Make multiselect buttons update when the list state changes
2009-10-09 13:28:10 -07:00
Mike Cleron
479b22a2f8 Make multiselect buttons update when the list state changes 2009-10-09 13:19:26 -07:00
Marc Blank
7a8bbfe0b0 am 4b59cfc8: Fix problem with timeouts and sending attachments (#2178288)
Merge commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb' into eclair-mr2

* commit '4b59cfc8ed4054ffb5ad85cea8aba94a430cc2cb':
  Fix problem with timeouts and sending attachments (#2178288)
2009-10-09 12:43:01 -07:00
Marc Blank
4b59cfc8ed Fix problem with timeouts and sending attachments (#2178288)
* Standard Exchange command timeouts are 20 seconds
* For sending, however, these need to be significantly longer to
  handle the case of sending large attachments, as sending (of any
  length) happens in a single HTTP Post command
* Having an infinite timeout leads to the (small) possibility of the
  Outbox hanging for a long time, holding up the sending of other
  mail, so we set a long, but not infinite timeout for this case
* Timeout now set for 15 minutes
* Prevent sync of Outbox and Drafts (the UI triggers these by changing
  the contents of these boxes, but we need to ignore the pings that
  are generated this way)

Change-Id: I5b830d6b4e94525d95138b2112be12898a37882e
2009-10-09 11:20:52 -07:00
Mihai Preda
affa5660e7 MessageView: UI change prev/next arrows.
Bug: 2149187

The prev/next buttons now each extends half the width, and are on black background.
2009-10-09 14:17:49 +02:00
Android (Google) Code Review
676ea183bd Merge change I15dccd1f into eclair-mr2
* changes:
  Server validates even though server address is wrong
2009-10-08 11:15:46 -04:00
Android (Google) Code Review
ff0c1f6313 Merge change Ic2d782c1 into eclair-mr2
* changes:
  Add checks to prevent duplicate service starts (fixes #2099830)
2009-10-08 11:12:08 -04:00
Mihai Preda
ba0b734043 am 73032f46: Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
Merge commit '73032f4657a77f733a348fe3c2c1fa783d335ff0' into eclair-mr2

* commit '73032f4657a77f733a348fe3c2c1fa783d335ff0':
  Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
2009-10-08 06:13:27 -07:00
Mihai Preda
73032f4657 Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().
Bug: 2167479
2009-10-08 11:58:45 +02:00
Marc Blank
8063528202 Server validates even though server address is wrong
* Fixes #2173664
* Make sure that not only is the OPTIONS command accepted, but that
  the server reports EAS versions and commands

Change-Id: I15dccd1fbd06aa3cf2ba8fbbf72d20918ec44617
2009-10-07 17:10:46 -07:00
Andrew Stadler
ec7bdde6a5 am 5b26bbe4: Switch QuickContact presentation from MEDIUM to LARGE.
Merge commit '5b26bbe4551ca095697f07eca7d09b24573cba11' into eclair-mr2

* commit '5b26bbe4551ca095697f07eca7d09b24573cba11':
  Switch QuickContact presentation from MEDIUM to LARGE.
2009-10-07 16:04:47 -07:00
Andrew Stadler
5b26bbe455 Switch QuickContact presentation from MEDIUM to LARGE.
Bug # http://b/issue?id=2170878
2009-10-07 15:18:13 -07:00
Andrew Stadler
9331d413b2 am 25920f67: Merge change I7a3482fd into eclair
Merge commit '25920f67e6ff67ee74637360aff072483b454a42' into eclair-mr2

* commit '25920f67e6ff67ee74637360aff072483b454a42':
  Handle IMAP empty bodies more safely
2009-10-07 14:59:45 -07:00
Andrew Stadler
b6756688b1 Handle IMAP empty bodies more safely
Some IMAP servers return NIL if you BODY.PEEK[TEXT] a messsage with
no body, instead of the more canonical {0}CRLF.  Instead of messing with the
parser to deal with that, it makes more sense not to try and fetch empty
bodies.  So there are three changes:

* Don't fetch parts when size = 0
* Don't append "null" when there is null body text
* Slight change to attachment handling so size is reported >0
* Unit tests on some of the related lower-level protocol stuff

Bug http://b/issue?id=2160387

Change-Id: Ifb8fb0ed5ce7297908e1ae8d5a02dda5975c4a3c
2009-10-07 11:42:27 -07:00
Marc Blank
572f6058f4 Add checks to prevent duplicate service starts (fixes #2099830)
Change-Id: Ic2d782c1b36459212f7f3441202220353eccd776
2009-10-07 09:49:21 -07:00
Fred Quintana
df002ccfac am 2c79efd8: Merge change I303304ab into eclair
Merge commit '2c79efd82736c4fd9a8351130b9410e9fb23f7f7' into eclair-mr2

* commit '2c79efd82736c4fd9a8351130b9410e9fb23f7f7':
  changes from Sync Manager API Review: bug 2164262
2009-10-06 22:55:01 -07:00
Marc Blank
a39b643d79 am e1b5e857: Merge change I2b0e3b10 into eclair
Merge commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99' into eclair-mr2

* commit 'e1b5e8574c86e4dcc184f1b3a4db352c9a631d99':
  Help with another push inconsistency edge case (#2131432)
2009-10-06 22:54:58 -07:00
Android (Google) Code Review
2c79efd827 Merge change I303304ab into eclair
* changes:
  changes from Sync Manager API Review: bug 2164262
2009-10-07 01:49:02 -04:00
Fred Quintana
84c975033d changes from Sync Manager API Review: bug 2164262 2009-10-06 17:19:32 -07:00
Android (Google) Code Review
e1b5e8574c Merge change I2b0e3b10 into eclair
* changes:
  Help with another push inconsistency edge case (#2131432)
2009-10-06 20:16:52 -04:00
Andrew Stadler
aa32726d8b am eb7752bf: Fix back-to-back message-id bugs
Merge commit 'eb7752bf695b2a93854e0bb89ddbbc2236bb9aea' into eclair-mr2

* commit 'eb7752bf695b2a93854e0bb89ddbbc2236bb9aea':
  Fix back-to-back message-id bugs
2009-10-06 14:36:51 -07:00
Mihai Preda
37aa27440b am 85d718cb: MessageCompose: quote plain-text body if available, otherwise quote HTML body.
Merge commit '85d718cb0735de9069673fbf9834fa64459c2178' into eclair-mr2

* commit '85d718cb0735de9069673fbf9834fa64459c2178':
  MessageCompose: quote plain-text body if available, otherwise quote HTML body.
2009-10-06 14:36:47 -07:00
Andrew Stadler
eb7752bf69 Fix back-to-back message-id bugs
* MessageCompose now adds message-id to new messages (it was previously
    done on its behalf by MimeMessage).
* LegacyConversions.updateMessageFields() now handles missing message-id
    without error.
* Unit tests for the LegacyConversions change

These two issues were combining with a failure of comcast's SMTP server
to insert message-id headers, to prevent delivery of a message between
any two comcast accounts using this client.

Bug # http://b/issue?id=2161478
2009-10-06 14:20:09 -07:00
Marc Blank
ffef9d9fe8 Help with another push inconsistency edge case (#2131432)
* If we are forced to abort a "ping" due to a watchdog alarm, we should
  handle this as a ping failure (which potentially changes the heartbeat)
  rather than a garden variety IOException.
* This prevents the additional overhead of connection error backoffs,
  which would only tend to increase the time needed to recover from the
  error.
* In one case reported by Moto, this appears to be the behavior of a WiFi
  router with NAT timeout.  This fix will cause maximum delay for pushed
  mail to be reduced in most cases.

Change-Id: I2b0e3b10d82762d20f63cac3ac4638a03f13f842
2009-10-06 13:46:09 -07:00
Marc Blank
25c7efc8eb Use constants for elements in projections.
Change-Id: I304e03da4419b4e7166189e08e4ce947c5f74383
2009-10-06 08:30:30 -07:00
Mihai Preda
85d718cb07 MessageCompose: quote plain-text body if available, otherwise quote HTML body.
Bug 2082852.
2009-10-06 16:50:54 +02:00
Mihai Preda
1ef86a50f8 MessageView: scroll to (0,0) on message change.
Bug 2156934.
2009-10-06 16:36:44 +02:00
Android (Google) Code Review
d493ba257a Merge change Ie90b74aa into eclair
* changes:
  Avoid NPE at onRefresh in MessageList
2009-10-05 22:31:42 -04:00
Android (Google) Code Review
8647be095a Merge change Id1c0bc24 into eclair
* changes:
  Correct issue with mail change parsing (fixes #2165649)
2009-10-05 16:59:07 -04:00
Marc Blank
d0848056f1 Correct issue with mail change parsing (fixes #2165649)
* Older parsing code that didn't take into account the fact that
  'flag' is a structured data item
* Requires Dr. No approval for Eclair_Sholes

Change-Id: Id1c0bc24e784b19c598d2b852975e135abebbdb0
2009-10-05 13:58:19 -07:00
Fred Quintana
794b7e9258 account manager api review changes 2009-10-05 11:29:01 -07:00
Android (Google) Code Review
888ea64f86 Merge change I26bb7b8b into eclair
* changes:
  Handle change from push to other intervals properly (#2165032)
2009-10-05 14:07:09 -04:00
Marc Blank
86765f3463 Handle change from push to other intervals properly (#2165032)
* Make sure eas account mailbox is also changed to the new sync interval

Change-Id: I26bb7b8b740c09f4c2cf848c33c9b642b9776fcc
2009-10-05 11:05:37 -07:00
Android (Google) Code Review
65aae18de3 Merge change Iaf15ead1 into eclair
* changes:
  Add patent disclaimer to appropriate directories (#2079270)
2009-10-05 14:02:45 -04:00
Marc Blank
c5563407dd Add patent disclaimer to appropriate directories (#2079270)
Change-Id: Iaf15ead1df560633f9d1b7e915ac846bb6789bf2
2009-10-05 11:01:30 -07:00
satok
e90b74aa04 Avoid NPE at onRefresh in MessageList
BUG: 2161449
2009-10-05 15:53:57 +09:00
Android (Google) Code Review
c9e05f16b2 Merge change I13229d84 into eclair
* changes:
  Change logging command to help debug Moto issue (#2165649)
2009-10-05 00:09:01 -04:00
Marc Blank
b3e449edf9 Change logging command to help debug Moto issue (#2165649)
* It has been reported that messages for a particular user are not
  staying in sync re: deletions via PC
* This hasn't been reported elsewhere
* The new logging command logs the subject of deleted messages which
  will help track down the problem
* I have also requested, and expect to receive, an account on the
  Moto server in question to try to replicate the issue

Requesting Dr. No approval for this important change to user logging
code.

Change-Id: I13229d843ef828b54f3514bdded5a7561a87989a
2009-10-04 19:56:19 -07:00
Android (Google) Code Review
ba7decd89d Merge change I1197ac76 into eclair
* changes:
  MessageCompose: allow sending email when started through external intent.
2009-10-02 19:26:53 -04:00
Marc Blank
36842abe9f Fix push failure edge case (#2161999)
* Unsafe (potentially stale) data was being written to the Mailbox table near
  the end of each sync.  It would effectively undo changes made to the
  Mailbox in other threads that occurred while the Mailbox was syncing.
* In this particular case, changes to sync interval (push/ping/timed)
  were being overwritten, which could cause push to get lost for as
  long as 30 minutes (the pingLoop timeout when there aren't any
  pingable mailboxes)
* Watchdog alarm was being set to wrong time (typo)
* Add extra user logging in case there are additional cases of push
* Only set sync status and time on successful sync
* Move ping error check into pingParser to avoid unnecessary sync

Change-Id: Icb4494078480ada39b7494b3abf380fb08858406
2009-10-02 11:09:08 -07:00
Mihai Preda
1197ac7692 MessageCompose: allow sending email when started through external intent.
Bug: 2161199.
2009-10-02 15:53:28 +02:00
Marc Blank
1eb0af5d80 Fix NPE issue w/ Contacts sync (#2160417)
* Oversight in late-night submission; simple fix

Change-Id: I0c3ebd4b23c1e913d74e153b3692b3ce8e3c0220
2009-10-01 14:31:24 -07:00
Mihai Preda
2d34c669c1 MessageView: scroll webview to (0,0) on message change.
Bug 2156934.
2009-10-01 13:21:59 +02:00
Andrew Stadler
f9ccc0ba88 Plumb send-message status callbacks from service
* Make sure service callbacks are installed
* Route from service sent-message callback to controller results

This sends the callback information back to listeners who care about
sent messages.  Note, due to impedance mismatch between the service
and the controller, this should not be used for much more than an
indication that outbox status has changed.

Bug # 2158497

Change-Id: I8d013d97ef53dcca85216f9b8c027ba3917c1e85
2009-10-01 03:12:40 -07:00
Android (Google) Code Review
3ea49f2151 Merge change Ic3cbc51d into eclair
* changes:
  Cleanup delete handling issues in POP3
2009-10-01 04:59:06 -04:00
Andrew Stadler
f16a3f2f6a Cleanup delete handling issues in POP3
* Removed obsolete "delete after 7 days" option from pop-up prefs
* Mark deleted message sentinels as "read" so they don't contribute
    to unread counts.

Bug # 2157487 and Bug # 2159278

Change-Id: Ic3cbc51d6f5ede2eb923e2d0e5c0dfee377764f5
2009-10-01 01:45:10 -07:00
Android (Google) Code Review
4f81086e34 Merge change Ie39a95f5 into eclair
* changes:
  Update unread count of outbox when messages are sent.
2009-10-01 04:38:40 -04:00
satok
e39a95f59b Update unread count of outbox when messages are sent.
BUG: 2158497
2009-10-01 17:29:32 +09:00
Android (Google) Code Review
2433cba85b Merge change Ic87cf984 into eclair
* changes:
  Call deferred requery from handler instead of Runnable
2009-10-01 03:20:52 -04:00
Andrew Stadler
7aca36b240 Call deferred requery from handler instead of Runnable
* code cleanup for Change I9cab6558
* Bug # 2126515

Change-Id: Ic87cf98485271e3fbf162c8b696114035337bd78
2009-10-01 00:14:25 -07:00
Marc Blank
cdd477e16a Delete attachments for mailboxes/messages deleted by server
Change-Id: Idd94dd0be9e8febe449fd4888fdb911af76618ce
2009-09-30 23:58:05 -07:00
Android (Google) Code Review
8401e1aca4 Merge change I99731e64 into eclair
* changes:
  Delete attachments when necessary, don't leak disk space
2009-10-01 02:47:53 -04:00
Android (Google) Code Review
3a88677988 Merge change I9cab6558 into eclair
* changes:
  Throttle the refresh of the message list as it changes (fixes #2126515)
2009-10-01 02:41:09 -04:00
Andrew Stadler
71754d3f94 Delete attachments when necessary, don't leak disk space
* Add AttachmentProvider.deleteAllMailboxAttachmentFiles
* Call it when server deletes a mailbox
* Confirmed (no change) all message deletes call deleteAllAttachmentFiles
* Unit tests of course :)

Bug # 2069004

Change-Id: I99731e6489fdca4cc9cebdff5fcf9c09d12b7b3a
2009-09-30 23:32:30 -07:00
Marc Blank
faae6edc55 Fix problem in which email/phone #'s could get erased erroneously
* Fixes #2158960
* Needed to keep track of existing untyped phone/email data

Change-Id: I5e58f092a35253ee785521fad6a2be7f1d2f4d6b
2009-09-30 23:10:57 -07:00
Marc Blank
3850149239 Throttle the refresh of the message list as it changes (fixes #2126515)
* Catch onContentChanged and throttle calls to cursor.requery()
* Use 2.5s for now.  This seems to provide excellent responsiveness
  with little apparent latency.
* Also fixes #2135882

Change-Id: I9cab6558c9cfeb1dbdb5fb250f4f04059db324f7
2009-09-30 23:06:45 -07:00
Android (Google) Code Review
1e3ac08a3f Merge change Iee4f5e88 into eclair
* changes:
  use Events for birthdays
2009-10-01 00:32:49 -04:00
Fred Quintana
eddebdf951 use Events for birthdays 2009-09-30 21:22:56 -07:00
Evan Millar
82d201b33a FastTrack->QuickContact
Change-Id: I7fc4b053ef86c9bc8374167dc11b1c04934a77bb
2009-09-30 19:49:39 -07:00
Android (Google) Code Review
b93860b5e4 Merge change I9f70f20b into eclair
* changes:
  Fix problem that could prevent push from working
2009-09-30 21:51:08 -04:00
Marc Blank
1660d17cbf Fix problem that could prevent push from working
* Could be related to issues seen by various testers

Change-Id: I9f70f20b3c52347b38468ca2b82ede7b46c39fa1
2009-09-30 18:49:20 -07:00
Android (Google) Code Review
f6f029b8e0 Merge change I18fdf62f into eclair
* changes:
  Fix mail sending for new message (#2158054)
2009-09-30 20:26:58 -04:00
Marc Blank
2f222b4b86 Fix mail sending for new message (#2158054)
Change-Id: I18fdf62f10ca350731446728b6095dabbc049bc1
2009-09-30 17:24:47 -07:00
Andrew Stadler
f9597e71d5 Fix assets & colors for MessageList & MessageView
* change read/unread list bkgnds
* change read/unread list text params
* new checkbox
* new stars

Bugs:http://b/issue?id=2156331 & http://b/issue?id=2156332
2009-09-30 16:18:36 -07:00
Android (Google) Code Review
6c1d3be245 Merge change I9c697612 into eclair
* changes:
  Use built-in rows for Birthday and OfficeLocation (fixes #2154423)
2009-09-30 18:30:22 -04:00
Android (Google) Code Review
21563fad09 Merge change Ie6d16a89 into eclair
* changes:
  Fix an issue related to ping loop errors and ping state; add logging
2009-09-30 15:39:59 -04:00
Marc Blank
3fef6f4a47 Fix an issue related to ping loop errors and ping state; add logging
Change-Id: Ie6d16a8914205ddf63ae1929961279f66360eb89
2009-09-30 12:23:23 -07:00
Andrew Stadler
54e0a5f65c Only auto-refresh when user opens mailbox
This prevents auto-refresh from triggering on non-explicit entry
to the mailbox (e.g. by resuming from another activity).

BUG: 2155843
2009-09-30 11:40:02 -07:00
Android (Google) Code Review
0b50eea451 Merge change Ib8ee27f0 into eclair
* changes:
  Add "deselect all"
2009-09-30 13:45:09 -04:00
Andrew Stadler
b8ee27f013 Add "deselect all"
* New menu items in MessageList
* Show/hide menu item if anything is checked
* Clear the selected items map, redraw listview, hide button panel

Bug # 2116257
2009-09-30 10:07:25 -07:00
Marc Blank
059b3e5ed5 Make sure intro text is saved/restored properly (fix #2155286)
Change-Id: I015783972e685472ea27cbdb854511e918d8f35e
2009-09-30 08:56:32 -07:00
Mihai Preda
536f04d3fb MessageView: UI: change prev/next arrows, re-enable notification bar shadow.
Bug: 2149187.
2009-09-30 15:10:17 +02:00
Android (Google) Code Review
ba6cf35b4f Merge change Ib17b43c7 into eclair
* changes:
  MessageCompose: avoid saving Draft early, before the message was loaded.
2009-09-30 05:16:07 -04:00
Andrew Stadler
62b5a51b8f Use FLAG_ACTIVITY_CLEAR_TOP for list activities
This prevents these activities from ever repeating on the task stack.

Helps http://b/issue?id=2149204 (and may even fix it)

Change-Id: Idf8255b703094a78a2df3e9f535b67fd65faef32
2009-09-30 01:08:06 -07:00
satok
bedd617c89 Fix the bug that combined Drafts folder is hidden when there are only read messages.
* Count all messages count in drafts folder
2009-09-30 14:49:46 +09:00
satok
3786cab2aa More refresh account and folder list
BUG: 2149171

* Change the string of combined inbox
* Change the string of combined starred folder
* Change the icon for combined inbox
* Change the icon for combined starred folder
2009-09-30 12:24:36 +09:00
Andrew Stadler
e4a7cc440f Re-enable modernized version of "optional" SSL/TLS
* Add "Accept all certificates" modes to incoming/outgoing secure choices
* Change URI scheme slightly to make "trust" a flag, not part of the
    protocol.
* Change Stores to know about new URI scheme
* Slightly rework Transport API to make "trust" an independent flag
* Adapt HostAuth to handle new Uri scheme
* Remove the old ambiguous "optional" code, which was allowing
    some unsigned certificates, but was *also* allowing TLS to
    optionally start (though not SSL, despite the UI strings.)
* Add a few unit tests to EmailContent
* Add logging and a bunch of comments to TrustManagerFactory, and a bit
    of simple cleanup to make it more readable.
* Add missing conversion of SSLException->CertificateValidationException
    in TLS so we get the correct certificate errors from TLS too.
* Re-enable TLS for mac.com accounts (which had a certificate problem)

Fixes bug http://b/2119755, http://b/1374780, and probably a raft of
earlier and/or external bugs about certificate problems.

Change-Id: Iaf99a8da3eaadaa4cdeec224737838b5d6813e55
2009-09-29 15:28:43 -07:00
Marc Blank
1d0e9e6fb9 Use built-in rows for Birthday and OfficeLocation (fixes #2154423)
Change-Id: I9c6976121c662b5071fb7c86e70ab91d3ae47e53
2009-09-29 13:07:20 -07:00
Marc Blank
0797b4e351 Near-final tweaks to sync timeouts and logging
* Tighten up user logging
* Send all HttpClient commands w/ watchdog to prevent
  holding wakelocks too long
* Fix case in which no ping boxes are ready in which
  ping loop would hang on to WakeLock indefinitely
* Release WakeLock for waits < 10 seconds, rather than
  30s in SyncManager
* Improve logging of IOExceptions
* Log network status (at least until #2150976 is fixed)

Change-Id: I020b8a21c2c4f536d5b6df871f6b5c03fdc66ab8
2009-09-29 11:37:01 -07:00
Mihai Preda
2ab30ce247 MessageCompose: avoid saving Draft early, before the message was loaded.
And correctly set mDraftNeedsSaving when started through external intent.

Bug: 2149148, 2152044.
2009-09-29 15:47:00 +02:00
Mihai Preda
2dd894df2f MessageCompose: fix unit tests that were broken by CL 27435.
Bug 2150598.
2009-09-29 11:19:01 +02:00
Android (Google) Code Review
b0b61fa2e4 Merge change I74466dcc into eclair
* changes:
  Update unread counts and default sender Id in AccountFolderList after folder loding messages
2009-09-29 00:35:05 -04:00
Marc Blank
3b95f691ee Handle upload of Phone.TYPE_ASSISTANT (fixes #2127721)
Change-Id: Ic59931b9d8643c599c43a164da4b4cfcc36f98c2
2009-09-28 20:41:51 -07:00
Marc Blank
a4258ed487 Fix sendPing to set proper ping timeouts
* We were setting the timeout and heartbeat to the same time,
  which could cause mistaken timeouts
* Set timeout ten seconds after the heartbeat for now, and set
  an alarm a few seconds after that

Change-Id: Ic2f7b44c9626ebbdd7a8821f53f7aaf6169f62c3
2009-09-28 20:06:54 -07:00
satok
473a5e5c66 Update unread counts and default sender Id in AccountFolderList after folder loding messages
BUG: 2072360
2009-09-29 10:32:44 +09:00
Android (Google) Code Review
62cf0a3336 Merge change Id6da4520 into eclair
* changes:
  Remove a bit of logging in ContactsSyncAdapter
2009-09-28 20:02:46 -04:00
Marc Blank
4833cd686f Remove a bit of logging in ContactsSyncAdapter
Change-Id: Id6da45202f0fa0970571a624a89546e90d1bee2c
2009-09-28 17:02:14 -07:00
Andrew Stadler
0d4681cd66 Catch possible NPE in IMAP sync.
I don't know the root cause of the null pointer (possibly a broken
connection earlier in the sync) but we shouldn't be crashing here.

Fixes http://b/2135743
2009-09-28 15:56:38 -07:00