aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Ebinger <breadley@google.com>2022-06-17 22:28:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-17 22:28:45 +0000
commit5b3b33b910708852cb50babd3b124b4f6657b9ae (patch)
tree0f088b2fb9d19169cff18d4530149b4dd8316ad7
parent3cc898acf88dc450bbfe4fcf5e38bb99488987af (diff)
parentd8d83258d60f72b983fa7f81ebc94a6932bb0891 (diff)
downloadims-5b3b33b910708852cb50babd3b124b4f6657b9ae.tar.gz
Fix RTT NPE due to ImsCall#close being called am: fff67ce3fc am: d8d83258d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/ims/+/18973189 Change-Id: Ifb0626828cdcdc4287ebdfeb8efd9d78cc8932ea Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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.");