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

Commit 801cc87c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-e7acb21b-1563-43e3-8840-63c103b127b9-for-git_oc-mr1-release-43...

release-request-e7acb21b-1563-43e3-8840-63c103b127b9-for-git_oc-mr1-release-4327239 snap-temp-L63900000101147407

Change-Id: I6a3965982ce896d734e8ae6bfd6a6cf79b76da1a
parents 9245cb42 1b62d994
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -431,9 +431,8 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
            }
            }
        }
        }


        // Find IPv4 DNS addresses.
        // Find all (IPv4 and IPv6) DNS addresses.
        String dnsServers = mLinkProperties.getDnsServers().stream()
        String dnsServers = mLinkProperties.getDnsServers().stream()
                .filter(Inet4Address.class::isInstance)
                .map(InetAddress::getHostAddress)
                .map(InetAddress::getHostAddress)
                .collect(Collectors.joining("\n"));
                .collect(Collectors.joining("\n"));


+8 −2
Original line number Original line Diff line number Diff line
@@ -437,10 +437,14 @@ public class WifiDetailPreferenceControllerTest {
    public void dnsServersPref_shouldHaveDetailTextSet() throws UnknownHostException {
    public void dnsServersPref_shouldHaveDetailTextSet() throws UnknownHostException {
        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,4,4}));
        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,4,4}));
        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,8,8}));
        mLinkProperties.addDnsServer(InetAddress.getByAddress(new byte[]{8,8,8,8}));
        mLinkProperties.addDnsServer(Constants.IPV6_DNS);


        displayAndResume();
        displayAndResume();


        verify(mockDnsPref).setDetailText("8.8.4.4\n8.8.8.8");
        verify(mockDnsPref).setDetailText(
                "8.8.4.4\n" +
                "8.8.8.8\n" +
                Constants.IPV6_DNS.getHostAddress());
    }
    }


    @Test
    @Test
@@ -546,12 +550,14 @@ public class WifiDetailPreferenceControllerTest {


        lp.addDnsServer(Constants.IPV6_DNS);
        lp.addDnsServer(Constants.IPV6_DNS);
        updateLinkProperties(lp);
        updateLinkProperties(lp);
        inOrder.verify(mockDnsPref, never()).setVisible(true);
        inOrder.verify(mockDnsPref).setDetailText(Constants.IPV6_DNS.getHostAddress());
        inOrder.verify(mockDnsPref).setVisible(true);


        lp.addDnsServer(Constants.IPV4_DNS1);
        lp.addDnsServer(Constants.IPV4_DNS1);
        lp.addDnsServer(Constants.IPV4_DNS2);
        lp.addDnsServer(Constants.IPV4_DNS2);
        updateLinkProperties(lp);
        updateLinkProperties(lp);
        inOrder.verify(mockDnsPref).setDetailText(
        inOrder.verify(mockDnsPref).setDetailText(
                Constants.IPV6_DNS.getHostAddress() + "\n" +
                Constants.IPV4_DNS1.getHostAddress() + "\n" +
                Constants.IPV4_DNS1.getHostAddress() + "\n" +
                Constants.IPV4_DNS2.getHostAddress());
                Constants.IPV4_DNS2.getHostAddress());
        inOrder.verify(mockDnsPref).setVisible(true);
        inOrder.verify(mockDnsPref).setVisible(true);