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

Commit abf832f6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix ANR at work's wait() in ThreadPool"

parents e7dc0d2a 64c36a97
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -172,11 +172,10 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter
    @Override
    @Override
    public void pause() {
    public void pause() {
        Future<?> task = mTask;
        Future<?> task = mTask;
        if (!task.isDone()) {
            task.cancel();
            task.cancel();
        task.waitDone();
        if (task.get() == null || task.isDone()) {
            mTask = null;
        }
        }
        mTask = null;
        if (mBitmapScreenNail != null) {
        if (mBitmapScreenNail != null) {
            mBitmapScreenNail.recycle();
            mBitmapScreenNail.recycle();
            mBitmapScreenNail = null;
            mBitmapScreenNail = null;