Loading services/core/java/com/android/server/ConnectivityService.java +4 −3 Original line number Diff line number Diff line Loading @@ -4731,11 +4731,12 @@ public class ConnectivityService extends IConnectivityManager.Stub } else { updateProxy(newLp, oldLp, networkAgent); } // TODO - move this check to cover the whole function if (!Objects.equals(newLp, oldLp)) { synchronized (networkAgent) { networkAgent.linkProperties = newLp; } // TODO - move this check to cover the whole function if (!Objects.equals(newLp, oldLp)) { notifyIfacesChangedForNetworkStats(); notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_IP_CHANGED); } Loading tests/net/java/com/android/server/ConnectivityServiceTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -4024,6 +4024,14 @@ public class ConnectivityServiceTest { cellNetworkCallback.assertNoCallback(); assertTrue(((LinkProperties)cbi.arg).isPrivateDnsActive()); assertEquals("strict.example.com", ((LinkProperties)cbi.arg).getPrivateDnsServerName()); // Send the same LinkProperties and expect getting the same result including private dns. // b/118518971 LinkProperties oldLp = (LinkProperties) cbi.arg; mCellNetworkAgent.sendLinkProperties(cellLp); waitForIdle(); LinkProperties newLp = mCm.getLinkProperties(cbi.network); assertEquals(oldLp, newLp); } @Test Loading Loading
services/core/java/com/android/server/ConnectivityService.java +4 −3 Original line number Diff line number Diff line Loading @@ -4731,11 +4731,12 @@ public class ConnectivityService extends IConnectivityManager.Stub } else { updateProxy(newLp, oldLp, networkAgent); } // TODO - move this check to cover the whole function if (!Objects.equals(newLp, oldLp)) { synchronized (networkAgent) { networkAgent.linkProperties = newLp; } // TODO - move this check to cover the whole function if (!Objects.equals(newLp, oldLp)) { notifyIfacesChangedForNetworkStats(); notifyNetworkCallbacks(networkAgent, ConnectivityManager.CALLBACK_IP_CHANGED); } Loading
tests/net/java/com/android/server/ConnectivityServiceTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -4024,6 +4024,14 @@ public class ConnectivityServiceTest { cellNetworkCallback.assertNoCallback(); assertTrue(((LinkProperties)cbi.arg).isPrivateDnsActive()); assertEquals("strict.example.com", ((LinkProperties)cbi.arg).getPrivateDnsServerName()); // Send the same LinkProperties and expect getting the same result including private dns. // b/118518971 LinkProperties oldLp = (LinkProperties) cbi.arg; mCellNetworkAgent.sendLinkProperties(cellLp); waitForIdle(); LinkProperties newLp = mCm.getLinkProperties(cbi.network); assertEquals(oldLp, newLp); } @Test Loading