diff options
author | James.cf Lin <jamescflin@google.com> | 2021-06-29 04:06:23 +0800 |
---|---|---|
committer | James.cf Lin <jamescflin@google.com> | 2021-06-29 04:06:23 +0800 |
commit | 78733ad48f12860727475b5c9e805c1caa8c34a6 (patch) | |
tree | 80aef219c48cbf1fe9d24d4d74f68b73466fef55 /telephony | |
parent | ab2e0e835cd1fd7c7e941a8ce3bb554ad2828021 (diff) |
[UCE] Fix NPE in the RcsContactUceCapability
When get the RcsContactPresenceTuple from the RcsContactUceCapability, it should check whether the servier ID is null or not
Bug: 191836903
Test: atest RcsContactUceCapabilityTest
Change-Id: I987c6f1fbcabfe64688f1d71210c83b6c4d8d9e0
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/ims/RcsContactUceCapability.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java index 530003d6350a..91121187a19a 100644 --- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java +++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java @@ -331,7 +331,7 @@ public final class RcsContactUceCapability implements Parcelable { return null; } for (RcsContactPresenceTuple tuple : mPresenceTuples) { - if (tuple.getServiceId().equals(serviceId)) { + if (tuple.getServiceId() != null && tuple.getServiceId().equals(serviceId)) { return tuple; } } |