Files
android_packages_modules_Co…/tests/net/java
Remi NGUYEN VAN 6e1b16c9fe Note network interfaces based on transport
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.

Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.

This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.

Bug: 174436414
Test: atest
      atest ConnectivityServiceTest#testBatteryStatsNetworkType \
          --rerun-until-failure 40

Change-Id: Icc912473d97a42eef73eb953607c9161fdbeb794
2021-01-20 15:53:54 +09:00
..