aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoonhunshin <joonhunshin@google.com>2023-07-12 05:10:11 +0000
committerJoonhun Shin <joonhunshin@google.com>2023-07-24 06:12:45 +0000
commit82845c3da780c14d1852d85ede6ff90aa3c70b1b (patch)
tree93a89cc5e224f7effc33c8dec5274de264d6be7f /src
parente8a7e5f9917151aed51659e62c13e5676152cd8f (diff)
downloadims-82845c3da780c14d1852d85ede6ff90aa3c70b1b.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 Merged-In: I7e86d8b8190c65b757b753fab2ea4564a7fccf7c
Diffstat (limited to 'src')
-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 06230a16..a2e07a56 100755
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -2508,7 +2508,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) {