Commit Graph

4044 Commits

Author SHA1 Message Date
Andy Stadler
a7255de196 am 91853f33: (-s ours) am 8c45186b: Merge "DO NOT MERGE Fix cursor leaks when canceling AsyncTask" into gingerbread
* commit '91853f336044eb9a835e0f2fb4c5eea934d907c9':
  DO NOT MERGE Fix cursor leaks when canceling AsyncTask
2011-01-05 08:12:19 -08:00
Andy Stadler
f252d5d95e am 42749c91: am 1a791e67: Fix NPE when switching IMAP into TLS
* commit '42749c9105c663e035a0863d7a6bda111b5c7112':
  Fix NPE when switching IMAP into TLS
2011-01-05 08:10:26 -08:00
Andy Stadler
91853f3360 am 8c45186b: Merge "DO NOT MERGE Fix cursor leaks when canceling AsyncTask" into gingerbread
* commit '8c45186b4783cb32794d764c0f34eba90e8793ff':
  DO NOT MERGE Fix cursor leaks when canceling AsyncTask
2011-01-05 08:05:54 -08:00
Andy Stadler
42749c9105 am 1a791e67: Fix NPE when switching IMAP into TLS
* commit '1a791e675ba5092569125bf09a9fcc721bd4c5e1':
  Fix NPE when switching IMAP into TLS
2011-01-05 08:04:08 -08:00
Andy Stadler
8c45186b47 Merge "DO NOT MERGE Fix cursor leaks when canceling AsyncTask" into gingerbread 2011-01-05 08:01:37 -08:00
Andy Stadler
1a791e675b Fix NPE when switching IMAP into TLS
* Update MockTransport to allow TLS connections
* Test TLS connection in ImapStore unit tests
* The bugfix: Re-query capabilities after closing/reopening parser for TLS

(Note: Actually, this is required by the IMAP RFC 3501, 6.2.1)

Bug: 3315939
Change-Id: I51f838043e87750b5712a1bd2e4f9c821b58c808
2011-01-04 20:21:15 -08:00
Andy Stadler
d23c361ff1 am 62ee3f4c: (-s ours) am ec988c2f: DO NOT MERGE Added/updated Yahoo provider settings
* commit '62ee3f4cac15e94dccb7795334c0355aa0e80228':
  DO NOT MERGE Added/updated Yahoo provider settings
2011-01-04 18:37:44 -08:00
Andy Stadler
62ee3f4cac am ec988c2f: DO NOT MERGE Added/updated Yahoo provider settings
* commit 'ec988c2fba0ea58e1130f24ab26aef986cb1cc4a':
  DO NOT MERGE Added/updated Yahoo provider settings
2011-01-04 18:35:44 -08:00
Andy Stadler
d2911c3e86 DO NOT MERGE Fix cursor leaks when canceling AsyncTask
We discovered that AsyncTask.cancel() doesn't quite perform as expected;
In particular, if you call cancel() during a particularly slow background
worker, the result is discarded and onPostExecute() is never called.  If
the result is an open cursor, then we "leak" by not closing it.

For AccountFolderList, which has a multi-step doInBackground():
1.  Check for isCancelled() during the long doInBackground() which will
    reduce the number of discarded cursors in the first place.
2.  Check for isCancelled() at the end of the long doInBackground() and
    if true, close the result cursors and return null.
3.  In the existing isCancelled() code in onPostExecute(), close the
    cursors.

For other Activities (with simpler configurations):
1.  Check for isCancelled() at the end of doInBackground() and if true,
    close the just-opened cursor and return null.

Bug: 3088870
Change-Id: Ie63a3197af563baa8bb0fe6f1ef9423e281cbf4c
2011-01-04 18:17:32 -08:00
Andy Stadler
ec988c2fba DO NOT MERGE Added/updated Yahoo provider settings
Specifically, added configuration settings for international Yahoo
domains (e.g. yahoo.ca, yahoo.de, yahoo.fr, etc), including partially
or wholly owned Yahoo subsidiaries; as well as partner domains from AT&T,
British Telecom, and Rogers whose email services are managed by Yahoo.

For domains supporting IMAP, changed to IMAP+SSL for mail handling to
support a better user experience on mobile devices.

Bug: 3258944
Original Author: Kristopher Giesing
Original CL: If5bdc70f70820f3f8aada6d2ee9b0cdb115432b5

Change-Id: Ib117f3755ff9250746f05debd1a6d1cda44c7855
2011-01-04 17:19:19 -08:00
Makoto Onuki
38a495fed9 Merge "Attempt to fix StaleDataException" 2011-01-04 16:38:05 -08:00
Makoto Onuki
d4cd717e9d Merge "Hide refresh button on combined view" 2011-01-04 14:55:20 -08:00
Makoto Onuki
dc1ac99210 Hide refresh button on combined view
Bug 3317656

Change-Id: I63f6fcd0aae29f01e40780bd7f69294e629aa888
2011-01-04 14:06:31 -08:00
Makoto Onuki
e447bea49b Attempt to fix StaleDataException
I'm not yet 100% sure what's going on, but the old code, not stopping
the scheduled forceLoad() in onReset() is apparently wrong.
onReset() is a new callback introduced in the recent loader change, so
this can explain why it started after the change.

Also, call super.onContentChanged() instead of directly calling forceLoad(),
as Loader.onContentChanged() now does more than just calling forceLoad.

Bug 3308465

Change-Id: Ica46bf994b571a26dd532734307a5c7ec6df0268
2011-01-04 13:43:07 -08:00
Marc Blank
99de346ed3 Merge "Handle query with an id of -1 more gracefully" 2011-01-04 11:17:42 -08:00
Andy Stadler
8b5cd2beff Remove UI thread access in AccountSetupBasics
* Move getOwnerName to a FutureTask
* Use AsyncTask for call to Utility.findExistingAccount()

Change-Id: I85e35a12cc28b1dda8a0ccd930869316032a3b12
2011-01-03 23:07:25 -08:00
Marc Blank
e6027c46f7 More correct fix for EAS message list callback issue (3251757)
Bug: 3251757

Change-Id: I879a97e343e9522c7c11e10a1bdd3915fc6dbaac
2010-12-31 12:48:35 -08:00
Marc Blank
cbdd9f78b2 Distinguish mailbox requests that are user requested
Bug: 3251757
Change-Id: Ie417ebf44c8b740db88e5854077782930359a958
2010-12-31 11:02:03 -08:00
Marc Blank
e70c2e0543 Merge "Fix format/draw issues with snippets" 2010-12-31 10:50:23 -08:00
Marc Blank
d306ba3438 Handle query with an id of -1 more gracefully
* In query of an otherwise valid URI with -1 as an id, simply return
  an empty cursor
* Add unit test to verify proper handling of invalid uri's

Bug: 3183245
Bug: 3292080

Change-Id: Ia0c35cbd0f5dd0dc4a8fc794226399644cf1fe13
2010-12-30 15:02:43 -08:00
Marc Blank
3d91924c99 Fix format/draw issues with snippets
Bug: 3315171
Change-Id: I8e44c1d64d2f3382fd1e03b35e3e59b048eca31d
2010-12-30 10:22:47 -08:00
Andy Stadler
a2269e84c6 Remove disk access from DeviceAdminReceiver callbacks
* DeviceAdminReceiver is actually a BroadcastReceiver, must follow
  guidelines to prevent ANR or early process kill.
* Remove all uses of AsyncTask from DeviceAdminReceiver
* Pass all calls through EmailBroadcastProcessorService
* Minor restructuring of EmailBroadcastProcessorService to support
  this use.

Change-Id: Ic6257ea5eff1bd466a736e0f93cb89b1cf8aa73e
2010-12-30 00:16:55 -08:00
Marc Blank
5498296287 Merge "Respect user's background download preference" 2010-12-30 00:05:42 -08:00
Marc Blank
7fbcefff7d Respect user's background download preference
Bug: 3312462
Change-Id: Ibd77b8de8782c4681ed122ac2f30374ca695e0ef
2010-12-30 00:05:15 -08:00
Marc Blank
1c1bd6a3eb Fix typo in debug code
Change-Id: Iffb3effa3fd659be3df3208bb587fea83bc9116e
2010-12-29 20:51:16 -08:00
Marc Blank
268597f68d Remove "Heartbeat" logging
Change-Id: Ib15451a9204a40b4bd74c55a348d732c8f43604a
2010-12-28 12:24:07 -08:00
Marc Blank
c041c799f3 Merge "Fix synchronization issue w/ closing CachedCursor" 2010-12-27 23:38:19 -08:00
Marc Blank
788408dee4 Fix synchronization issue w/ closing CachedCursor
Bug: 3306031

Change-Id: I3000cf92c27e93b2df94799492fb9960a3d795dc
2010-12-26 11:45:30 -08:00
Andy Stadler
926e7369d1 Remove UI thread disk access from AccountSetupNames
* Remove unneeded DB read in onCreate (add runtime checks for problems)
* Move more exit/commit work to existing AsyncTask
* Add lockout of next & back keys while processing

Bug: 2792509 (probably others)
Change-Id: I0db030a1f1df94ba721510b5112519f260f5c0f9
2010-12-25 23:16:10 -08:00
Andy Stadler
4f6a507d9b Merge "Fix ANR's in AccountSetupOptions" 2010-12-24 21:53:36 -08:00
Andy Stadler
ec9398e7c6 Fix ANR's in AccountSetupOptions
* Move all db ops off UI thread
* Reorder methods in typical progression (they were random)

Bug: 3134660
Bug: 3134677
Change-Id: Idd4f411e937336bbd09bcc03d9ad036d22dc5e19
2010-12-23 16:38:52 -08:00
Makoto Onuki
0e1604b9d4 Merge "Log cursor/adapter class name and such when detecting a crash" 2010-12-23 16:17:03 -08:00
Makoto Onuki
adbb6f8bc4 Log cursor/adapter class name and such when detecting a crash
Also log where the cursor was closed, if it is.

To investigate bug 3308465 and bug 3305706

Change-Id: I2b0fd9ea14757b6cf7597cd7162686d050d43fe9
2010-12-23 16:15:44 -08:00
Eric Fischer
9d825439da Merge "Import revised translations." 2010-12-23 14:47:24 -08:00
Eric Fischer
111fcf97e1 Import revised translations.
Change-Id: I6923154d77795bd51be4d62158c1ccaf23522fb8
2010-12-23 14:14:58 -08:00
Andy Stadler
2959a7e073 Fix ANRs from Email.setServicesEnabled()
* Create sync & async versions
* Rename all callsites so sync is very apparent
* Fix callsites appropriately
* Clean up interaction between reconciler and setServicesEnabled

Bug: 3133770
Bug: 3134677
Change-Id: Iefbc7814d9aa390baea6345e450e2a4768bf0a9a
2010-12-23 13:19:55 -08:00
Andy Stadler
6aec257fe7 Merge "Fix NPE when changing server settings w/security dialog" 2010-12-23 11:08:50 -08:00
Andy Stadler
c4c3a71f9f Merge "Async code for read/unread and starred" 2010-12-23 11:01:42 -08:00
Makoto Onuki
948bcad901 Merge "Use swapCursor(null) instead of changeCursor(null)" 2010-12-23 10:15:05 -08:00
Andy Stadler
3b1cccf234 Async code for read/unread and starred
* Move each worker into async (combining common code)
* Update unit tests to match
* Make the message->account->controller lookups more efficient

Bug: 3134653
Change-Id: Icc82998a5d8eb07c7ebc7edbd28cd9308378d866
2010-12-23 09:55:16 -08:00
Andy Stadler
d8f1d8f2ff Fix NPE when changing server settings w/security dialog
Bug: 3302453
Change-Id: I8adb5166598b72f9eb4a26bbe47afc756e764159
2010-12-22 19:01:08 -08:00
Andy Stadler
8d22e85e45 Reduce/eliminate DB access in server settings
* Create shared async worker to check for duplicate accounts
* Use it in AccountSetupIncomingFragment
* Use it in AccountSetupExchangeFragment
* Debounce proceed/next button because work is now async
* Also, upgrade leftover old-style code in AccountSetupOutgoingFragment

Bug: 3134666
Change-Id: I5c24a6546d1ab66aedc5c4ac826ddf4f1ff53446
2010-12-22 18:57:27 -08:00
Makoto Onuki
e0f28d7853 Use swapCursor(null) instead of changeCursor(null)
The later closes the old cursor while the former doesn't.
LoaderManager takes care of closing cursors, so no need to close
cursors by ourselves.

Change-Id: Ib652e6877dcfc1fea51ffc862254eaeed451cdfa
2010-12-22 17:35:44 -08:00
Andy Stadler
6ebaa90847 Reduce/eliminate UI thread access in MailService
* Make most calls to AccountBackupRestore return immediately w/o DB access
* Move most workers in MailService into async runnables
* Remove account restore / null check from ACTION_SEND_PENDING_EMAIL
* Strengthened unit test on Mailbox.findMailboxOfType() because after
  removing the account check (above), sendPendingMessages depends on
  findMailboxOfType() returning -1 on a missing account.
* Clean up a bunch of warnings (no longer use deprecated Config.LOGD)

Bug: 3133763  (and probably others)
Change-Id: Id39707bca7a8ebf5000f84d542013411ff0f422e
2010-12-22 16:34:48 -08:00
Andy Stadler
9f7e3982ad Reduce UI thread disk access in account settings
This change is in top-level settings for a given account:
* Call saveSettings async on UI changes, instead of synch at onDestroy()
* In loadSettings, get default account id async

Also sprinkled in some TODOs for future whack-a-mole fixes.

Bug: 3133639

Change-Id: I5216c78d28b35fe47e43b48ad0db3a3e57b25004
2010-12-22 13:55:42 -08:00
Marc Blank
84dfef9085 Merge "Put individual account inboxes in widget rotation" 2010-12-22 13:46:11 -08:00
Makoto Onuki
cb89e057ec Assets!
Change-Id: Ibde20ffb64049387fe025293f7d35b342352eb81
2010-12-22 13:16:44 -08:00
Makoto Onuki
22b33a5a4a Show stacktrace when failing to load message body
Change-Id: Ie6b2dda6fa32982e48e052f5f8fe2c699ebc8a01
2010-12-22 12:53:05 -08:00
Marc Blank
66b6b95646 Put individual account inboxes in widget rotation
Change-Id: If1fddc107d9934849bbf273a67dd1db9c2063d99
2010-12-22 12:49:15 -08:00
Makoto Onuki
ac0a11b25a Remove empty.html, which isn't used any more.
Change-Id: I2fa4b669d930cb48b9d03a799ebef7e88c9dfe09
2010-12-22 11:59:31 -08:00