Commit Graph

1075 Commits

Author SHA1 Message Date
Marc Blank
39ec429862 Have SyncManager.ping check that the service is properly started
* If not, it will start the service
* This will catch cases in which the Email process has been killed
  while alarms are set (this would be the vast majority of the time)
* Will look into ways of catching any remaining cases...
* Fixes #2131432

Change-Id: Id71e68d14b5d1b0402c866db49a07c7b1adf499d
2009-09-22 13:22:16 -07:00
Marc Blank
80699e50fb am 4cf3252f: Workaround system peculiarity to fix #2134509
Merge commit '4cf3252fb07623fe4985aaf3bf63360099320a41' into eclair-plus-aosp

* commit '4cf3252fb07623fe4985aaf3bf63360099320a41':
  Workaround system peculiarity to fix #2134509
2009-09-22 12:18:01 -07:00
Marc Blank
4cf3252fb0 Workaround system peculiarity to fix #2134509
* Our AccountManager listener was getting unregistered due to the way
  ApplicationContext caches AccountManager in a static member
* The result was that AccountManager registers its listeners against the
  FIRST context it is instantiated with!  Future calls will all obtain
  this pre-initialized AccountManager.
* In this case, AccountSetupOptions was the first caller (to create the
  AccountManager Account for Exchange)
* The subsequent call to register a listener therefore had its registration
  tied to the context of AccountSetupOptions, and was therefore leaked
  when AccountSetupOptions finished!
* This caused a chain of problems - the leaked receiver, an Exception in
  AccountManager when trying to ping the listener in an expired context,
  and eventually the bug referenced above, which became a P1 issue

Change-Id: I478e28d21ca77419afa8011e4ed8101cdf67ab79
2009-09-22 10:40:46 -07:00
Marc Blank
eaeb754a87 am b2f71dac: Merge change 26262 into eclair
Merge commit 'b2f71dac39730afa349459c399811bcadaf05f7b' into eclair-plus-aosp

* commit 'b2f71dac39730afa349459c399811bcadaf05f7b':
  Only handle mailbox alarms for EAS mailboxes
2009-09-21 16:57:55 -07:00
Android (Google) Code Review
b2f71dac39 Merge change 26262 into eclair
* changes:
  Only handle mailbox alarms for EAS mailboxes
2009-09-21 19:50:54 -04:00
Marc Blank
ac028f3cca Only handle mailbox alarms for EAS mailboxes
* Fixes #2135238 in which a change to a POP/IMAP mailbox
  ended up causing a sync of that box as an EAS mailbox
* The fix is to check that mailboxes with changes actually
  belong to an EAS account before trying to sync them

Change-Id: I832095ce61665813cbcfb2aa58e45a48db8a34e7
2009-09-21 16:20:26 -07:00
Andrew Stadler
7602cd92d0 am fa52e6c9: Clean out old mailbox names logic and fix a couple of bugs.
Merge commit 'fa52e6c95674aef6461a5cfc670a052e1c5b7f2f' into eclair-plus-aosp

* commit 'fa52e6c95674aef6461a5cfc670a052e1c5b7f2f':
  Clean out old mailbox names logic and fix a couple of bugs.
2009-09-21 14:54:56 -07:00
Andrew Stadler
fa52e6c956 Clean out old mailbox names logic and fix a couple of bugs.
* Get rid of old Account.getxxxFolderName() calls.
* Clean up any call sites to them
* Properly rename the existing special folder name identifiers
* Use a hash table in MessagingController to improve identification
    of special folders for IMAP accounts
* Fix a bug in Controller, which was creating new server-side folders
    using localized names.
* Fix a bunch of code in Controller that was using mContext, instead of
    using mProviderContext to support testability.
* Fix broken unit tests in ControllerProviderOpsTests

Fixes bug 1904373
2009-09-21 14:44:30 -07:00
Marc Blank
2fa1eb2796 am 71bba443: Merge change 26224 into eclair
Merge commit '71bba443f2c418df69bb3316f9394b1eda6f751f' into eclair-plus-aosp

* commit '71bba443f2c418df69bb3316f9394b1eda6f751f':
  Fix broken test after changes to Rfc822Output
2009-09-21 13:21:20 -07:00
Android (Google) Code Review
71bba443f2 Merge change 26224 into eclair
* changes:
  Fix broken test after changes to Rfc822Output
2009-09-21 16:16:51 -04:00
Marc Blank
e470332456 Fix broken test after changes to Rfc822Output
Change-Id: Ibb1ab79cf2cce1e5ad66d3a45656e575dbabbc6d
2009-09-21 13:16:16 -07:00
Andrew Stadler
93f51bc0b6 am ad4ec059: Fix broken MessageView tests
Merge commit 'ad4ec0590d3d38c9cca621eb12569b6b6766be02' into eclair-plus-aosp

* commit 'ad4ec0590d3d38c9cca621eb12569b6b6766be02':
  Fix broken MessageView tests
2009-09-21 13:11:24 -07:00
Andrew Stadler
ad4ec0590d Fix broken MessageView tests
I'm surprised these were working at all.
2009-09-21 12:59:25 -07:00
Marc Blank
31b3ae4b39 am f20fa620: On service calls to startSync, make sure SyncManager is running
Merge commit 'f20fa620d2cd0a871d5b02c113d59bc181c88619' into eclair-plus-aosp

* commit 'f20fa620d2cd0a871d5b02c113d59bc181c88619':
  On service calls to startSync, make sure SyncManager is running
2009-09-21 12:15:31 -07:00
Marc Blank
f20fa620d2 On service calls to startSync, make sure SyncManager is running
* Check that SyncManager's thread is running when called for startSync;
  if not, start the service via Intent
* Mostly fixes #2133115 (although there are possibly other cases for
  SyncManager not running, this will cause any manual "Refresh" to start
  it up.)
* Added large comment at onCreate to explain how all this works

Change-Id: Ib43211ddb36e2f79ee5b1f6973f8bc2bc499024c
2009-09-21 11:31:29 -07:00
Fred Quintana
7a2866d372 am 06261b70: Merge change 26062 into eclair
Merge commit '06261b704e210b9f560fbef71142c0071dff1acd' into eclair-plus-aosp

* commit '06261b704e210b9f560fbef71142c0071dff1acd':
  make EAS set CALLER_IS_SYNCADAPTER for writes
2009-09-21 11:08:46 -07:00
Android (Google) Code Review
06261b704e Merge change 26062 into eclair
* changes:
  make EAS set CALLER_IS_SYNCADAPTER for writes
2009-09-21 14:00:02 -04:00
Marc Blank
009f325ea6 am 7b79163a: Show "sync contacts" setting properly in the settings page
Merge commit '7b79163aac1542577304d60fa76de6feb6be48c7' into eclair-plus-aosp

* commit '7b79163aac1542577304d60fa76de6feb6be48c7':
  Show "sync contacts" setting properly in the settings page
2009-09-21 10:47:45 -07:00
Marc Blank
7b79163aac Show "sync contacts" setting properly in the settings page
Change-Id: I9c198e7795a8f2ea348361092eae22c8ff22a1a0
2009-09-21 10:39:10 -07:00
Marc Blank
61b69abea4 am c06b6290: Merge change 26118 into eclair
Merge commit 'c06b6290c720ab65b0b38eddc522cc8f4f78cfca' into eclair-plus-aosp

* commit 'c06b6290c720ab65b0b38eddc522cc8f4f78cfca':
  Clean up recent submission per stadler
2009-09-21 07:24:39 -07:00
Android (Google) Code Review
c06b6290c7 Merge change 26118 into eclair
* changes:
  Clean up recent submission per stadler
2009-09-21 10:20:13 -04:00
Marc Blank
5386ed2f55 am 1d4d1b8d: Make sure we don\'t start account sync without push/ping active
Merge commit '1d4d1b8d9032b7a4bab3bf3368d582392aea9dc3' into eclair-plus-aosp

* commit '1d4d1b8d9032b7a4bab3bf3368d582392aea9dc3':
  Make sure we don't start account sync without push/ping active
2009-09-20 22:43:12 -07:00
Marc Blank
2b4b5e2f26 Clean up recent submission per stadler
Change-Id: I9fdaf3ccefe7eab41ad853e120af36b78a30ce7b
2009-09-20 22:24:08 -07:00
Marc Blank
1d4d1b8d90 Make sure we don't start account sync without push/ping active
* Wait for mailboxes to finish the initial sync while waiting in pingLoop

Change-Id: Ie1606e225261e071981cef0aab3bd623a360fc86
2009-09-20 22:18:19 -07:00
Marc Blank
d73b67a306 am c190de83: Merge change 26015 into eclair
Merge commit 'c190de8369478ccfb155afed89348a8d5a9c6ebc' into eclair-plus-aosp

* commit 'c190de8369478ccfb155afed89348a8d5a9c6ebc':
  Handle issues in SmartReply/SmartForward
2009-09-20 22:10:38 -07:00
Android (Google) Code Review
c190de8369 Merge change 26015 into eclair
* changes:
  Handle issues in SmartReply/SmartForward
2009-09-21 01:04:51 -04:00
Andrew Stadler
598c53bbf5 am 8067b542: UI cleanups for new account creation
Merge commit '8067b54294356f375521ba3d1e7db3df117b65a4' into eclair-plus-aosp

* commit '8067b54294356f375521ba3d1e7db3df117b65a4':
  UI cleanups for new account creation
2009-09-20 17:47:14 -07:00
Andrew Stadler
0cc888b337 am 22722207: Close security hole in Email provider
Merge commit '22722207f5cc68c91d4be8307a29a9adb711b6d3' into eclair-plus-aosp

* commit '22722207f5cc68c91d4be8307a29a9adb711b6d3':
  Close security hole in Email provider
2009-09-20 17:32:35 -07:00
Andrew Stadler
8067b54294 UI cleanups for new account creation
* Improve appearance of basics screen and use simplified text
* Provide alternate text when in EAS account setup flow (from acct mgr)
* Change "Exchange/ActiveSync" button to "Exchange account"
* Add some spacing to the three buttons, to improve appearance

Bugs addressed:
2128055 Change string in account picker activity to Exchange
2132713 Welcome message for Email app is inappropriate when coming from
          Settings -> Accounts & sync -> New account
2009-09-20 17:26:43 -07:00
Andrew Stadler
22722207f5 Close security hole in Email provider
* Prevent open access to sent or received messages
* Prevent open access to account info incl. passwords
* Allow access only to system apps

Bug # 2133080
2009-09-20 17:23:59 -07:00
Fred Quintana
db08876316 make EAS set CALLER_IS_SYNCADAPTER for writes 2009-09-20 16:04:13 -07:00
Marc Blank
2f99314326 Handle issues in SmartReply/SmartForward
* SmartReply doesn't put in header information related to the original, which
  looks like a bug in EAS, so we add our own (as we do for SMTP)
* SmartForward works properly, but doesn't put any CRLF between the new text
  and the original; we fix that by adding one after the original text.
* Addresses #2132658

Change-Id: I48efec0d02598a8e9ce2a54b4c66464e8e62e5d6
2009-09-20 15:50:31 -07:00
Marc Blank
7ce7dae0e1 am cc15a77b: Replace commented out call to actionNotifyNewMessages
Merge commit 'cc15a77b289e3c840d0ed49213d7a62dfe2ee25a' into eclair-plus-aosp

* commit 'cc15a77b289e3c840d0ed49213d7a62dfe2ee25a':
  Replace commented out call to actionNotifyNewMessages
2009-09-20 15:27:37 -07:00
Marc Blank
cc15a77b28 Replace commented out call to actionNotifyNewMessages
* Fixes #2132978

Change-Id: Ia7d50c6eb890a5f4938ac2d567183b25e0b923bd
2009-09-20 15:19:49 -07:00
Marc Blank
3cc8929c40 am 7041dc5d: Reconnect Settings -> Accounts to Email account settings screen
Merge commit '7041dc5d1b4e231c7ee51a76b0dd02f5525ac51d' into eclair-plus-aosp

* commit '7041dc5d1b4e231c7ee51a76b0dd02f5525ac51d':
  Reconnect Settings -> Accounts to Email account settings screen
2009-09-20 15:04:11 -07:00
Marc Blank
7041dc5d1b Reconnect Settings -> Accounts to Email account settings screen
* This was broken during the AccountManager naming reversion

Change-Id: Ib2ccc9ca187ffdaf4a978c3c8111808be50d1583
2009-09-20 14:56:02 -07:00
Marc Blank
869f5d5fd8 am a740e293: Fix bugs related to orientation change in MessageCompose
Merge commit 'a740e2935746254b836051069813489cb38be666' into eclair-plus-aosp

* commit 'a740e2935746254b836051069813489cb38be666':
  Fix bugs related to orientation change in MessageCompose
2009-09-20 13:13:31 -07:00
Marc Blank
a740e29357 Fix bugs related to orientation change in MessageCompose
* Save reference to LoadMessageTask and cancel it in onDestroy
* Check whether we've already processed the source message
  before calling processSourceMessage
* Fixes #2097361 (Duplicate addresses in reply/reply all)
* Fixes NPE (not in Buganizer) related to fast orientation changes
  due to duplicated background task

Change-Id: Ib8115e29c9d88db1be009df4f549f925db8a1c19
2009-09-20 13:03:44 -07:00
Andrew Stadler
4de3f97290 am 8d5004a6: Modernize the code to load message and body from DB.
Merge commit '8d5004a6eb28844c9d86a5e97a947043b693eee6' into eclair-plus-aosp

* commit '8d5004a6eb28844c9d86a5e97a947043b693eee6':
  Modernize the code to load message and body from DB.
2009-09-20 10:14:51 -07:00
Andrew Stadler
8d5004a6eb Modernize the code to load message and body from DB.
* Don't use unneeded managed cursors
* Put more of the DB work in async
* Don't try to load HTML and plaintext simultaneously
* Explicitly catch & handle exceptions during db ops

Bug # 2087051  (see also bug # 2122960 re unexpected db exceptions)

Change-Id: I446086bc4f3a85b2e766b12d1f7271e61e3ae8d5
2009-09-20 10:06:08 -07:00
Marc Blank
f08a92083b am 8587aa61: Make EmailProvider more threadsafe w/r/t transactions
Merge commit '8587aa61211d288d05b5fb2ddf02d69cabe6a9e2' into eclair-plus-aosp

* commit '8587aa61211d288d05b5fb2ddf02d69cabe6a9e2':
  Make EmailProvider more threadsafe w/r/t transactions
2009-09-20 10:00:53 -07:00
Marc Blank
bbcd8597c1 am 9d43de5d: Remove parser logging from standard SD logging
Merge commit '9d43de5d1206eb54c4486cefec44a7bbd810bada' into eclair-plus-aosp

* commit '9d43de5d1206eb54c4486cefec44a7bbd810bada':
  Remove parser logging from standard SD logging
2009-09-19 22:29:37 -07:00
Marc Blank
8587aa6121 Make EmailProvider more threadsafe w/r/t transactions
* Since transactions can be nested, get rid of pointless/dangerous
  flag for indicating we're in a transaction.
* Fixes #2131847

Change-Id: I2955e8a7659533e8ee9e71b949a042570466df45
2009-09-19 22:24:52 -07:00
Marc Blank
9d43de5d12 Remove parser logging from standard SD logging
* Change description for one of the logging labels to reflect
  what it actually does

Change-Id: Ib07b7330a20af5b099b42ae3733b71641c4bddd9
2009-09-19 22:19:28 -07:00
Marc Blank
adf9cfb1f0 am 726d22b9: Merge change 25895 into eclair
Merge commit '726d22b96280f376f52367304a53f5ac1d4e60f3' into eclair-plus-aosp

* commit '726d22b96280f376f52367304a53f5ac1d4e60f3':
  Fix service behavior w/r/t onStartCommand, onCreate, onDestroy
2009-09-19 20:47:37 -07:00
Android (Google) Code Review
726d22b962 Merge change 25895 into eclair
* changes:
  Fix service behavior w/r/t onStartCommand, onCreate, onDestroy
2009-09-19 23:41:35 -04:00
Andrew Stadler
43ee5fdcb9 am 02df29b6: Merge change 25903 into eclair
Merge commit '02df29b647ae77f0ff283ab9ace737b077db3509' into eclair-plus-aosp

* commit '02df29b647ae77f0ff283ab9ace737b077db3509':
  Fix bug that caused Cc field to be displayed when empty.
2009-09-19 13:57:51 -07:00
Android (Google) Code Review
02df29b647 Merge change 25903 into eclair
* changes:
  Fix bug that caused Cc field to be displayed when empty.
2009-09-19 16:52:28 -04:00
Marc Blank
a4482e865d Fix service behavior w/r/t onStartCommand, onCreate, onDestroy
* Make sure to null out vars in onDestroy
* Use START_STICKY as return value for onStartCommand
* Start SyncManager from EasAuthenticator callback, rather from the
  authenticator itself (otherwise, the Account might not have been
  created when we start SyncManager)

Change-Id: I54ff8d5586e96f016b365587717710dee3202da8
2009-09-19 13:38:59 -07:00
Marc Blank
d63e5a0bfc am 24bbde37: Merge change 25897 into eclair
Merge commit '24bbde37478bb717d72a13e880359d1ab28216a8' into eclair-plus-aosp

* commit '24bbde37478bb717d72a13e880359d1ab28216a8':
  Revert change to AccountManager naming; use email address again
2009-09-19 10:27:27 -07:00