Merge "Fix crash when resuming MessageListXL."

This commit is contained in:
Makoto Onuki 2010-08-10 09:36:01 -07:00 committed by Android (Google) Code Review
commit e6fcf73917

View File

@ -894,7 +894,8 @@ public class MessageListFragment extends ListFragment implements OnItemClickList
// Load messages
String selection =
Utility.buildMailboxIdSelection(mResolver, mMailboxKey);
Cursor c = mActivity.managedQuery(EmailContent.Message.CONTENT_URI, MESSAGE_PROJECTION,
Cursor c = mActivity.getContentResolver().query(
EmailContent.Message.CONTENT_URI, MESSAGE_PROJECTION,
selection, null, EmailContent.MessageColumns.TIMESTAMP + " DESC");
return c;
}
@ -910,7 +911,6 @@ public class MessageListFragment extends ListFragment implements OnItemClickList
}
MessageListFragment.this.mAccountId = mAccountKey;
// TODO changeCursor(null)??
mListAdapter.changeCursor(cursor);
setListAdapter(mListAdapter);