Add getters to NetworkStateSnapshot
Address API council feedback, add getters to NetworkStateSnapshot instead of exposing the bare fields directly. (cherry picked from ag/14233655) Bug: 183972826 Test: FrameworksNetTests Merged-In: Id1707753b42ae88d2b95e4bd00a792609434e4f5 Change-Id: Id1707753b42ae88d2b95e4bd00a792609434e4f5
This commit is contained in:
@@ -889,7 +889,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
final LinkProperties stackedProp = new LinkProperties();
|
||||
stackedProp.setInterfaceName(stackedIface);
|
||||
final NetworkStateSnapshot wifiState = buildWifiState();
|
||||
wifiState.linkProperties.addStackedLink(stackedProp);
|
||||
wifiState.getLinkProperties().addStackedLink(stackedProp);
|
||||
NetworkStateSnapshot[] states = new NetworkStateSnapshot[] {wifiState};
|
||||
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
@@ -1580,10 +1580,10 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
}
|
||||
|
||||
private String getActiveIface(NetworkStateSnapshot... states) throws Exception {
|
||||
if (states == null || states.length == 0 || states[0].linkProperties == null) {
|
||||
if (states == null || states.length == 0 || states[0].getLinkProperties() == null) {
|
||||
return null;
|
||||
}
|
||||
return states[0].linkProperties.getInterfaceName();
|
||||
return states[0].getLinkProperties().getInterfaceName();
|
||||
}
|
||||
|
||||
private void expectNetworkStatsSummary(NetworkStats summary) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user