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

Commit 04d04ca8 authored by Sungcheol Ahn's avatar Sungcheol Ahn Committed by Gerrit Code Review
Browse files

Merge "[Telephony] checking if the delegate is null before calling."

parents 5a5a4504 93fbf49a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ public class SipDelegateAidlWrapper implements DelegateStateCallback, DelegateMe
        @Override
        public void sendMessage(SipMessage sipMessage, long configVersion) {
            SipDelegate d = mDelegate;
            if (d == null) {
                return;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                mExecutor.execute(() -> d.sendMessage(sipMessage, configVersion));
@@ -58,6 +61,9 @@ public class SipDelegateAidlWrapper implements DelegateStateCallback, DelegateMe
        @Override
        public void notifyMessageReceived(String viaTransactionId)  {
            SipDelegate d = mDelegate;
            if (d == null) {
                return;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                mExecutor.execute(() -> d.notifyMessageReceived(viaTransactionId));
@@ -70,6 +76,9 @@ public class SipDelegateAidlWrapper implements DelegateStateCallback, DelegateMe
        @Override
        public void notifyMessageReceiveError(String viaTransactionId, int reason) {
            SipDelegate d = mDelegate;
            if (d == null) {
                return;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                mExecutor.execute(() -> d.notifyMessageReceiveError(viaTransactionId, reason));
@@ -82,6 +91,9 @@ public class SipDelegateAidlWrapper implements DelegateStateCallback, DelegateMe
        @Override
        public void cleanupSession(String callId)  {
            SipDelegate d = mDelegate;
            if (d == null) {
                return;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                mExecutor.execute(() -> d.cleanupSession(callId));