Commit Graph

4214 Commits

Author SHA1 Message Date
Todd Kennedy
64ac7a6cc8 Use new holo light icons
Use the new icons where appropriate. This is not a complete change as there are
still some icons missing.

Change-Id: I51d1458749343ddfc6456dc2a9853b8bc2540e26
2011-01-06 13:42:20 -08:00
Andy Stadler
29d79adf4b 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 AsyncTasks (with simpler configurations):
1.  Check for isCancelled() at the end of doInBackground() and if true,
    close the just-opened cursor and return null.

See also Change-Id: Ie63a3197af563baa8bb0fe6f1ef9423e281cbf4c
Bug: 3088870

Change-Id: I51b11bb5b23f209f8b61962500a063040484fd24
2011-01-06 13:35:57 -08:00
Andy Stadler
201a24f51e Harden MailService against half-created accounts
* Add simple sanity checks to scanned accounts, skip over if bad
* Fix existing unit tests and add new unit test for this change
* Also fixed minor bug in EmailContent that was never triggered in
  production code (only discovered it via a unit test).
* Also fixed minor bug in an existing unit test

Bug: 2937595
Change-Id: Id60bbb5d8bd923db043d46891c7f89d7debb0a11
2011-01-06 12:53:40 -08:00
Marc Blank
2f1a7e8d0a Fix typo in CL 87363
Change-Id: I7a52a2a5e93dd6ccde8b040ffb7b1d224f026ce7
2011-01-05 20:35:46 -08:00
Makoto Onuki
ce9df41fc1 Merge "Pixel perfect: mailbox list" 2011-01-05 17:40:51 -08:00
Makoto Onuki
33d7399d8d Merge "action bar: make current mailbox closer to gmail" 2011-01-05 17:37:45 -08:00
Marc Blank
2b3ac66f9f Merge "Move onStartCommand processing to worker thread" 2011-01-05 17:36:55 -08:00
Marc Blank
08065b2669 Merge "Limit user mailboxes for EAS (to 1000, for now)" 2011-01-05 17:35:36 -08:00
Makoto Onuki
e9818160e1 action bar: make current mailbox closer to gmail
Still not pp, but the current one looks too ugly.  Let's change it.

Bug 3137891

Change-Id: I2e036d23b2ec99bb63fe300a5c2ade72b192f81a
2011-01-05 17:29:48 -08:00
Makoto Onuki
0187c3e203 Merge "Message list item: Use "activated" background" 2011-01-05 16:42:03 -08:00
Makoto Onuki
eaf748e6ee Message list item: Use "activated" background
for the selected message.

This also fixes wired background flicker when you long-press.
(Apparently you can't share StateListDrawable among multiple items...)

Change-Id: I922f50a5b2a33731919e26a55bd3537d55057af5
2011-01-05 16:38:19 -08:00
Makoto Onuki
f72c4c2c2a Merge "Fix NPE in loadAttachmentCallback" 2011-01-05 16:03:56 -08:00
Makoto Onuki
80a98fd939 Pixel perfect: mailbox list
Now it should be close enough...

Also fixed the "selected mailbox won't get hilighted" issue.

Bug 3137965

Change-Id: Ifba83783121e62363fac6428534394d2e0a4bee9
2011-01-05 15:33:31 -08:00
Marc Blank
c56b246f8f Limit user mailboxes for EAS (to 1000, for now)
* Sending too many mailboxes to EmailProvider in a single batch can
  lead to a binder exception, so we limit them
* Move all provider updates into the commit() method

Bug: 3325331
Bug: 3314442

Change-Id: I1bd8d19a96f642b6e49e2f47a5ddcebaa55c0ec0
2011-01-05 15:29:50 -08:00
Andy Stadler
0bd7ab96aa Merge "Prevent duplicate mailbox creation" 2011-01-05 14:28:12 -08:00
Marc Blank
6f2c724f2f Move onStartCommand processing to worker thread
* Also, reduce service logging

Bug: 3133763
Change-Id: Icc09ddb5966b78350b4485e52a3d8e1f92d9c576
2011-01-05 14:21:13 -08:00
Andy Stadler
900021dbee Prevent duplicate mailbox creation
* Synchronized findOrCreateMailboxOfType

Bug: 3291982
Change-Id: I7146458112296aa2b0f4b8f24d0c86f16a8b6626
2011-01-05 14:11:44 -08:00
Marc Blank
12247faa91 Merge "Add final backgrounds to message list items" 2011-01-05 11:46:53 -08:00
Marc Blank
bd9b2ff2b3 Add final backgrounds to message list items
Bug: 3137994
Change-Id: Ife96b23815999290fc1d263ca6d8f4cedaef1b20
2011-01-05 11:46:16 -08:00
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
1144e6c93f Fix NPE in loadAttachmentCallback
bug 3317175

Change-Id: Ib892af0b1bf00cd99c370e114dd8d98b6887933c
2011-01-04 16:28:50 -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