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

Commit a70441af authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add missing telecom locks.

There is a chance for a hold or call state set action to occur outside
of the Telecom sync lock since the PendingActions are performed on a
Handler.

Test: Compile
Bug: 145223210
Change-Id: I52515db031e1b4aa1db200cc2f031fc533b4bc94
parent 44a7e4f1
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -4692,10 +4692,12 @@ public class CallsManager extends Call.ListenerBase

        @Override
        public void performAction() {
            synchronized (mLock) {
                Log.d(this, "perform set call state for %s, state = %s", mCall, mState);
                setCallState(mCall, mState, mTag);
            }
        }
    }

    private final class ActionUnHoldCall implements PendingAction {
        private final Call mCall;
@@ -4708,10 +4710,12 @@ public class CallsManager extends Call.ListenerBase

        @Override
        public void performAction() {
            synchronized (mLock) {
                Log.d(this, "perform unhold call for %s", mCall);
                mCall.unhold("held " + mPreviouslyHeldCallId);
            }
        }
    }

    private final class ActionAnswerCall implements PendingAction {
        private final Call mCall;