Merge "Follow-up to the loader API change"
This commit is contained in:
commit
22fb45817b
|
@ -151,6 +151,7 @@ public class ContactStatusLoader extends AsyncTaskLoader<ContactStatusLoader.Res
|
|||
cancelLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
|
|
@ -353,11 +353,11 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
if (cursor.getCount() == 0) {
|
||||
// If there's no row, don't set it to the ListView.
|
||||
// Instead use setListShown(false) to make ListFragment show progress icon.
|
||||
mListAdapter.changeCursor(null);
|
||||
mListAdapter.swapCursor(null);
|
||||
setListShown(false);
|
||||
} else {
|
||||
// Set the adapter.
|
||||
mListAdapter.changeCursor(cursor);
|
||||
mListAdapter.swapCursor(cursor);
|
||||
setListAdapter(mListAdapter);
|
||||
setListShown(true);
|
||||
|
||||
|
@ -375,7 +375,9 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
mAccountChanging = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
mListAdapter.swapCursor(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1061,6 +1061,7 @@ public class MessageListFragment extends ListFragment
|
|||
mMailboxChanging = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<MailboxAccountLoader.Result> loader) {
|
||||
}
|
||||
}
|
||||
|
@ -1112,7 +1113,7 @@ public class MessageListFragment extends ListFragment
|
|||
}
|
||||
|
||||
// Update the list
|
||||
mListAdapter.changeCursor(cursor);
|
||||
mListAdapter.swapCursor(cursor);
|
||||
// Show chips if combined view.
|
||||
mListAdapter.setShowColorChips(mMailboxId < 0 && mCountTotalAccounts > 1);
|
||||
setListAdapter(mListAdapter);
|
||||
|
@ -1141,7 +1142,9 @@ public class MessageListFragment extends ListFragment
|
|||
mMailboxChanging = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
mListAdapter.swapCursor(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -594,7 +594,9 @@ public class MessageListXL extends Activity implements
|
|||
updateAccountList(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
mAccountsSelectorAdapter.swapCursor(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -634,7 +636,7 @@ public class MessageListXL extends Activity implements
|
|||
}
|
||||
|
||||
// Update the dropdown list.
|
||||
mAccountsSelectorAdapter.changeCursor(accountsCursor);
|
||||
mAccountsSelectorAdapter.swapCursor(accountsCursor);
|
||||
|
||||
// Don't show the title.
|
||||
ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
|
||||
|
|
|
@ -686,6 +686,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<ContactStatusLoader.Result> loader) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
|||
null, new MailboxesLoaderCallbacks());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Long> loader) {
|
||||
}
|
||||
}
|
||||
|
@ -202,10 +203,12 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
|||
if (mDestroyed) {
|
||||
return;
|
||||
}
|
||||
mAdapter.changeCursor(data);
|
||||
mAdapter.swapCursor(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
mAdapter.swapCursor(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,6 +278,7 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
|||
cancelLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ public class MailboxAccountLoader extends AsyncTaskLoader<MailboxAccountLoader.R
|
|||
cancelLoad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue