aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Ebinger <breadley@google.com>2022-06-17 22:18:30 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-17 22:18:30 +0000
commitf12e073e47d0757270c861dacefa0976a3a57f93 (patch)
tree24f8752d53acbdf7e438d19db23af60f09612d4f /src
parent6780d3a616d0bb788f9b66d130f8a23356f54fa9 (diff)
parentbd325fc0efd8f104f93e04969abd53e198df2d5f (diff)
downloadims-f12e073e47d0757270c861dacefa0976a3a57f93.tar.gz
Fix RTT NPE due to ImsCall#close being called am: fff67ce3fc am: bd325fc0ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/ims/+/18973189 Change-Id: I74c46af5ca4249c7e70640a89ca86c49ff41f4d9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/java/com/android/ims/ImsCall.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index a5813d88..06230a16 100755
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -1762,7 +1762,12 @@ public class ImsCall implements ICall {
public void sendRttMessage(String rttMessage) {
synchronized(mLockObj) {
if (mSession == null) {
- loge("sendRttMessage::no session");
+ loge("sendRttMessage::no session, ignoring");
+ return;
+ }
+ if (mCallProfile == null || mCallProfile.mMediaProfile == null) {
+ loge("sendRttMessage:: no valid call profile, ignoring");
+ return;
}
if (!mCallProfile.mMediaProfile.isRttCall()) {
logi("sendRttMessage::Not an rtt call, ignoring");
@@ -1781,7 +1786,12 @@ public class ImsCall implements ICall {
synchronized(mLockObj) {
if (mSession == null) {
- loge("sendRttModifyRequest::no session");
+ loge("sendRttModifyRequest::no session, ignoring");
+ return;
+ }
+ if (mCallProfile == null || mCallProfile.mMediaProfile == null) {
+ loge("sendRttModifyRequest:: no valid call profile, ignoring");
+ return;
}
if (rttOn && mCallProfile.mMediaProfile.isRttCall()) {
logi("sendRttModifyRequest::Already RTT call, ignoring request to turn on.");
@@ -1815,6 +1825,11 @@ public class ImsCall implements ICall {
synchronized(mLockObj) {
if (mSession == null) {
loge("sendRttModifyResponse::no session");
+ return;
+ }
+ if (mCallProfile == null || mCallProfile.mMediaProfile == null) {
+ loge("sendRttModifyResponse:: no valid call profile, ignoring");
+ return;
}
if (mCallProfile.mMediaProfile.isRttCall()) {
logi("sendRttModifyResponse::Already RTT call, ignoring.");