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

Commit 729033b5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Expose pending request to subclasses and ensure clean up" am: a5cb050a

parents 7230f4cb a5cb050a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public abstract class AbstractMultiplePendingRequestsRemoteService<S
            final int size = mPendingRequests.size();
            if (mVerbose) Slog.v(mTag, "Sending " + size + " pending requests");
            for (int i = 0; i < size; i++) {
                mPendingRequests.get(i).run();
                handlePendingRequest(mPendingRequests.get(i));
            }
            mPendingRequests.clear();
        }
+6 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
    private int mServiceExitSubReason;

    /** Requests that have been scheduled, but that are not finished yet */
    private final ArrayList<BasePendingRequest<S, I>> mUnfinishedRequests = new ArrayList<>();
    protected final ArrayList<BasePendingRequest<S, I>> mUnfinishedRequests = new ArrayList<>();

    /**
     * Callback called when the service dies.
@@ -676,6 +676,11 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I
                mCancelled = true;
            }

            S service = mWeakService.get();
            if (service != null) {
                service.finishRequest(this);
            }

            onCancel();
            return true;
        }