aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoonhunshin <joonhunshin@google.com>2023-07-12 05:10:11 +0000
committerjoonhunshin <joonhunshin@google.com>2023-07-12 10:31:10 +0000
commit7b3ec7ec4fcc03f62937c191a764377801cbf0b4 (patch)
tree5025c8f208a0783c34e87f9eebdf8eed6d7c3f8e
parent86110605303fdd840ca254b817f33d74ea178f21 (diff)
downloadims-7b3ec7ec4fcc03f62937c191a764377801cbf0b4.tar.gz
Fixed NullPointException after SRVCC completed event
If IImsCallSessionListener.callSessionProgressing() is called from ImsService right after receiving SRVCC complete state event from RIL, Framework tries to access CallProfile. However, NPE was observed because CallProfile is released by SRVCC completed event. Bug: 286447293 Test: atest ImsCallTest Change-Id: I7e86d8b8190c65b757b753fab2ea4564a7fccf7c
-rwxr-xr-xsrc/java/com/android/ims/ImsCall.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index 29f6acd4..5fae98e2 100755
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -2538,7 +2538,11 @@ public class ImsCall implements ICall {
setCallProfile(updatedProfile);
// Apply the new mediaProfile on top of the Call Profile so it is not ignored in
// case the ImsService has not had a chance to update it yet.
- mCallProfile.mMediaProfile.copyFrom(profile);
+ if( mCallProfile != null && mCallProfile.mMediaProfile != null) {
+ mCallProfile.mMediaProfile.copyFrom(profile);
+ } else {
+ logi("Call was closed already, skip updating CallProfile");
+ }
}
if (listener != null) {