aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho <hhshin@google.com>2021-11-25 05:23:44 +0000
committerHyunho <hhshin@google.com>2021-12-01 02:02:11 +0000
commit020211c4acd170c49a1a397150bb288f9fffe89f (patch)
treeed6c730f4656e5e42f2b498ae92bb3b446d6bbca
parent4311533936996851957619a98df16fefda1c14d9 (diff)
downloadtelephony-020211c4acd170c49a1a397150bb288f9fffe89f.tar.gz
Fixed incorrect count logic
The no_cap count is incorrect when checking the capability of the presence notification event. If the pidfXml has rcs_cap, mmtel_cap and no_cap, the no_cap count must be set to zero. This is because either rcs or mmtel cap is included in the xml Bug: b/207321490 Test: atest RcsStatsTest Change-Id: I867a3ef33738de1444a375083a7033e597862026 Merged-In: I867a3ef33738de1444a375083a7033e597862026
-rw-r--r--src/java/com/android/internal/telephony/metrics/RcsStats.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/metrics/RcsStats.java b/src/java/com/android/internal/telephony/metrics/RcsStats.java
index 2d63d1f389..c93cf2b2ad 100644
--- a/src/java/com/android/internal/telephony/metrics/RcsStats.java
+++ b/src/java/com/android/internal/telephony/metrics/RcsStats.java
@@ -603,7 +603,7 @@ public class RcsStats {
for (RcsContactUceCapability capability : updatedCapList) {
boolean rcsCap = false;
boolean mmtelCap = false;
- boolean noCap = false;
+ boolean noCap = true;
List<RcsContactPresenceTuple> tupleList = capability.getCapabilityTuples();
if (tupleList.isEmpty()) {
noCap = true;
@@ -615,16 +615,17 @@ public class RcsStats {
String serviceId = tuple.getServiceId();
if (RCS_SERVICE_ID_SET.contains(serviceId)) {
rcsCap = true;
+ noCap = false;
} else if (MMTEL_SERVICE_ID_SET.contains(serviceId)) {
if (serviceId.equals(RcsContactPresenceTuple.SERVICE_ID_CALL_COMPOSER)) {
if ("1.0".equals(tuple.getServiceVersion())) {
rcsCap = true;
+ noCap = false;
continue;
}
}
mmtelCap = true;
- } else {
- noCap = true;
+ noCap = false;
}
}
mRcsStats.onPresenceNotifyEvent(subId, "", true, rcsCap,