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

Commit 6fddc6d1 authored by Hongshik's avatar Hongshik
Browse files

Add PCSCF to LinkProperties.



Some application or service are needed PCSCF address to register IMS server but there is no way to get it on Android Framework.
We have added PCSCF address to LinkProperties like attached diff files.

Test: get Linkproperties and check Pcscf addresses.

Change-Id: I2cb3cde7b843aab538cebd1c352d06491e1a7155
Signed-off-by: default avatarHongshik <hshik.kim@samsung.com>
parent db53d9ee
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1131,6 +1131,26 @@ public class DataConnection extends StateMachine {
                    throw new UnknownHostException("Empty dns response and no system default dns");
                }

                // set pcscf
                if (response.getPcscfs().size() > 0) {
                    for (String pcscf : response.getPcscfs()) {
                        if (pcscf == null) continue;
                        pcscf = pcscf.trim();
                        if (pcscf.isEmpty()) continue;
                        InetAddress ia;
                        try {
                            ia = NetworkUtils.numericToInetAddress(pcscf);
                        } catch (IllegalArgumentException e) {
                            throw new UnknownHostException("Non-numeric pcscf addr=" + pcscf);
                        }
                        if (!ia.isAnyLocalAddress()) {
                            linkProperties.addPcscfServer(ia);
                        } else {
                            log("bad address in PCSCF");
                        }
                    }
                }

                for (InetAddress gateway : response.getGateways()) {
                    // Allow 0.0.0.0 or :: as a gateway;
                    // this indicates a point-to-point interface.