d0ee1e404db67a238d7017fb77757a0ffb2a4a1b |
|
26-Jan-2011 |
Makoto Onuki <omakoto@google.com> |
Fix bug where mailbox list won't update in combined view The problem was that CombinedMailboxesLoader used the cursor returned by super.loadInBackground() (which contains accounts), to build a matrix cursor (which contains special mailboxes and accounts and will be returned), and *it closed the first cursor* after building the matrix cursor. However, because this first cursor is the one that CursorLoader sets an observer, it shouldn't be closed until the returned matix cursor closes. In other words the two cursors should have the same lifecycle. Fixed it by using ClosingMatrixCursor that used by AccountsLoader, which is doing a similar thing, but properly. Bug 3387730 Change-Id: I554ade001dc25afa869eefb4dcf9887495e6753e
/packages/apps/Email/src/com/android/email/data/ClosingMatrixCursor.java
|