Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 861362da authored by andychou's avatar andychou Committed by Andy Chou
Browse files

Fix ims_reasoninfo_mapping_string_array not working problem

If config ims_reasoninfo_mapping_string_array like "332||510", extra
message will map to "" instead of null.
But if there is no extra message reported, it will be null instead of "".
It causes compare fail.

Bug: 119804849
Test: Field test pass
Change-Id: Ie05f6cc55367a60e7c997a8d6e1337c0eeb16aa2
Merged-In: I042a433940d6a07d48576431445b9357ecb48ff3
parent 099b5d9a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1937,9 +1937,11 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
    @VisibleForTesting
    public int maybeRemapReasonCode(ImsReasonInfo reasonInfo) {
        int code = reasonInfo.getCode();
        String extraMessage =
                reasonInfo.getExtraMessage() == null ? "" : reasonInfo.getExtraMessage();

        Pair<Integer, String> toCheck = new Pair<>(code, reasonInfo.getExtraMessage());
        Pair<Integer, String> wildcardToCheck = new Pair<>(null, reasonInfo.getExtraMessage());
        Pair<Integer, String> toCheck = new Pair<>(code, extraMessage);
        Pair<Integer, String> wildcardToCheck = new Pair<>(null, extraMessage);
        if (mImsReasonCodeMap.containsKey(toCheck)) {
            int toCode = mImsReasonCodeMap.get(toCheck);