Fall back to Wi-Fi data display in data usage screen with no SIM.
Bug: 70950124 Test: manual Test: make RunSettingsRoboTests Change-Id: I06bf78e54119819be87e15baca7e5b6a241958cb
This commit is contained in:
@@ -48,13 +48,14 @@ public abstract class DataUsageBaseFragment extends DashboardFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
final Context context = getActivity();
|
||||
Context context = getContext();
|
||||
|
||||
services.mNetworkService = INetworkManagementService.Stub.asInterface(
|
||||
ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE));
|
||||
services.mStatsService = INetworkStatsService.Stub.asInterface(
|
||||
ServiceManager.getService(Context.NETWORK_STATS_SERVICE));
|
||||
services.mPolicyManager = NetworkPolicyManager.from(context);
|
||||
services.mPolicyManager = (NetworkPolicyManager)context
|
||||
.getSystemService(Context.NETWORK_POLICY_SERVICE);
|
||||
|
||||
services.mPolicyEditor = new NetworkPolicyEditor(services.mPolicyManager);
|
||||
|
||||
@@ -100,6 +101,7 @@ public abstract class DataUsageBaseFragment extends DashboardFragment {
|
||||
|
||||
/**
|
||||
* Test if device has an ethernet network connection.
|
||||
* TODO(b/77590489): Remove this method when DataUsageSummaryLegacy is deprecated.
|
||||
*/
|
||||
public boolean hasEthernet(Context context) {
|
||||
if (DataUsageUtils.TEST_RADIOS) {
|
||||
|
Reference in New Issue
Block a user