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

Commit 102e6631 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed synchronization when calling cancellation signal." into oc-mr1-dev

parents 4ce4d954 60b765b7
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -562,7 +562,10 @@ final class RemoteFillService implements DeathRecipient {
        void onTimeout(RemoteFillService remoteService) {
            // NOTE: Must make these 2 calls asynchronously, because the cancellation signal is
            // handled by the service, which could block.
            final ICancellationSignal cancellation = mCancellation;
            final ICancellationSignal cancellation;
            synchronized (mLock) {
                cancellation = mCancellation;
            }
            if (cancellation != null) {
                remoteService.dispatchOnFillTimeout(cancellation);
            }
@@ -587,7 +590,10 @@ final class RemoteFillService implements DeathRecipient {
        public boolean cancel() {
            if (!super.cancel()) return false;

            final ICancellationSignal cancellation = mCancellation;
            final ICancellationSignal cancellation;
            synchronized (mLock) {
                cancellation = mCancellation;
            }
            if (cancellation != null) {
                try {
                    cancellation.cancel();