Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b057801 authored by Romain Guy's avatar Romain Guy
Browse files

Make sure AsyncTask sens a null result to onPostExecute() when cancelled.

This is in accordance to the documentation. This bug was approved by hackbod.
The change is safe and is a single line of code.

Change-Id: I9b771df3ae2aa4f496d15e6c43b677f3245539ac
parent f7ae77cd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ public abstract class AsyncTask<Params, Progress, Result> {
    }

    private void finish(Result result) {
        if (isCancelled()) result = null;
        onPostExecute(result);
        mStatus = Status.FINISHED;
    }