Clean ups.

This commit is contained in:
Karim Abou Zeid 2016-03-25 20:48:18 +01:00
commit 6749661b0b
3 changed files with 4 additions and 11 deletions

View file

@ -41,6 +41,7 @@ public abstract class WrappedAsyncTaskLoader<D> extends AsyncTaskLoader<D> {
*/
@Override
protected void onStartLoading() {
super.onStartLoading();
if (this.mData != null) {
deliverResult(this.mData);
} else if (takeContentChanged() || this.mData == null) {
@ -53,6 +54,7 @@ public abstract class WrappedAsyncTaskLoader<D> extends AsyncTaskLoader<D> {
*/
@Override
protected void onStopLoading() {
super.onStopLoading();
// Attempt to cancel the current load task if possible
cancelLoad();
}