Use default network template in billing cycle settings.

- if the network template is not set in the bundle arguments, use the
default network template for getting the billing data.
- change to use ConnectivityManager.from(context) in DataUsageUtils to
be consistent with the usage in other methods.

Change-Id: I25eb27f8f26d9ecafc66aa2c69806e94c6b63499
Fixes: 117452991
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-10-09 17:10:34 -07:00
parent b3eaf62562
commit c4b40b0669
4 changed files with 59 additions and 10 deletions

View File

@@ -172,8 +172,7 @@ public final class DataUsageUtils {
return SystemProperties.get(TEST_RADIOS_PROP).contains("wifi");
}
ConnectivityManager connectivityManager =
context.getSystemService(ConnectivityManager.class);
final ConnectivityManager connectivityManager = ConnectivityManager.from(context);
return connectivityManager != null && connectivityManager.isNetworkSupported(TYPE_WIFI);
}