Update to new Loader APIs.
Change-Id: Ic228f7b785f0d902a0188cfe995006b73b8a3c8b
This commit is contained in:
parent
0fd8ae8808
commit
0698f4027f
|
@ -155,8 +155,4 @@ public class ContactStatusLoader extends AsyncTaskLoader<ContactStatusLoader.Res
|
|||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
stopLoading();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ public class MailboxListFragment extends ListFragment implements OnItemClickList
|
|||
boolean accountChanging = false;
|
||||
if ((mLastLoadedAccountId != -1) && (mLastLoadedAccountId != mAccountId)) {
|
||||
accountChanging = true;
|
||||
getLoaderManager().stopLoader(LOADER_ID_MAILBOX_LIST);
|
||||
getLoaderManager().destroyLoader(LOADER_ID_MAILBOX_LIST);
|
||||
|
||||
// Also, when we're changing account, update the mailbox list if stale.
|
||||
refreshMailboxListIfStale();
|
||||
|
|
|
@ -1012,8 +1012,8 @@ public class MessageListFragment extends ListFragment
|
|||
|
||||
private void stopLoaders() {
|
||||
final LoaderManager lm = getLoaderManager();
|
||||
lm.stopLoader(LOADER_ID_MAILBOX_LOADER);
|
||||
lm.stopLoader(LOADER_ID_MESSAGES_LOADER);
|
||||
lm.destroyLoader(LOADER_ID_MAILBOX_LOADER);
|
||||
lm.destroyLoader(LOADER_ID_MESSAGES_LOADER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -97,8 +97,8 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
LoaderManager lm = getActivity().getLoaderManager();
|
||||
lm.stopLoader(ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER);
|
||||
lm.stopLoader(ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER);
|
||||
lm.destroyLoader(ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MESSAGE_CHECKER);
|
||||
lm.destroyLoader(ActivityHelper.GLOBAL_LOADER_ID_MOVE_TO_DIALOG_MAILBOX_LOADER);
|
||||
mDestroyed = true;
|
||||
super.onDestroy();
|
||||
}
|
||||
|
@ -282,9 +282,5 @@ public class MoveMessageToDialog extends DialogFragment implements DialogInterfa
|
|||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
stopLoading();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,8 +106,4 @@ public class MailboxAccountLoader extends AsyncTaskLoader<MailboxAccountLoader.R
|
|||
public void reset() {
|
||||
stopLoading();
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
stopLoading();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue