Merge "[Telephony] checking if the delegate is null before calling." am: 04d04ca89d am: 548c9b5edf am: 218437e97f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2015035

Change-Id: Iaace73b2c390981cb2ddd34d67ee7a4afb308127
This commit is contained in:
Sungcheol Ahn
2022-03-09 10:51:10 +00:00
committed by Automerger Merge Worker

View File

@@ -48,6 +48,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));
@@ -59,6 +62,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));
@@ -71,6 +77,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));
@@ -83,6 +92,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));