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

Commit 9ae24036 authored by James.cf Lin's avatar James.cf Lin
Browse files

Fix the duplex information not being written in the pidf body.

Bug: 186061496
Test: atest -c CtsTelephonyTestCases:android.telephony.ims.cts.ImsServiceTest
Change-Id: I807fc15fd0ffaba1b1ca7a9d3b0707b213b3de0e
parent 3b370d5d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -172,14 +172,14 @@ public class PidfParserUtils {
        // Duplex element
        List<String> supportedDuplexModes = serviceCaps.getSupportedDuplexModes();
        List<String> UnsupportedDuplexModes = serviceCaps.getUnsupportedDuplexModes();
        if (supportedDuplexModes != null && !supportedDuplexModes.isEmpty() &&
                UnsupportedDuplexModes != null && !UnsupportedDuplexModes.isEmpty()) {
        if ((supportedDuplexModes != null && !supportedDuplexModes.isEmpty()) ||
                (UnsupportedDuplexModes != null && !UnsupportedDuplexModes.isEmpty())) {
            Duplex duplex = new Duplex();
            if (!supportedDuplexModes.isEmpty()) {
                duplex.addSupportedType(supportedDuplexModes.get(0));
            }
            if (!UnsupportedDuplexModes.isEmpty()) {
                duplex.addSupportedType(UnsupportedDuplexModes.get(0));
                duplex.addNotSupportedType(UnsupportedDuplexModes.get(0));
            }
            servCapsElement.addElement(duplex);
        }