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

Commit cb533c58 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Added Locking for MmTelFeature

oneway binder methods were not locked, causing the
possible condition where the method was called again
before the previous call to that method completed.

Bug: 74119196
Test: Manual, Telephony Unit Testing
Change-Id: I794d5f7ea6f091ca83aa71a438c204ac97fad7a1
parent 03664c94
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -139,35 +139,45 @@ public class MmTelFeature extends ImsFeature {

        @Override
        public int queryCapabilityStatus() throws RemoteException {
            synchronized (mLock) {
                return MmTelFeature.this.queryCapabilityStatus().mCapabilities;
            }
        }

        @Override
        public void addCapabilityCallback(IImsCapabilityCallback c) {
            // no need to lock, structure already handles multithreading.
            MmTelFeature.this.addCapabilityCallback(c);
        }

        @Override
        public void removeCapabilityCallback(IImsCapabilityCallback c) {
            // no need to lock, structure already handles multithreading.
            MmTelFeature.this.removeCapabilityCallback(c);
        }

        @Override
        public void changeCapabilitiesConfiguration(CapabilityChangeRequest request,
                IImsCapabilityCallback c) throws RemoteException {
            synchronized (mLock) {
                MmTelFeature.this.requestChangeEnabledCapabilities(request, c);
            }
        }

        @Override
        public void queryCapabilityConfiguration(int capability, int radioTech,
                IImsCapabilityCallback c) {
            synchronized (mLock) {
                queryCapabilityConfigurationInternal(capability, radioTech, c);
            }
        }

        @Override
        public void setSmsListener(IImsSmsListener l) throws RemoteException {
            synchronized (mLock) {
                MmTelFeature.this.setSmsListener(l);
            }
        }

        @Override
        public void sendSms(int token, int messageRef, String format, String smsc, boolean retry,