Remove summary loader in some fragments

- Summary Loader only works in injected items, but those fragments
are not injected to Settings UI. The SummaryLoader class them are
useless.

Bug: 141653158
Test: robolectric
Change-Id: I1ca0bf5a1f417b7fe86b28e96aff7d4aee2cf2d3
This commit is contained in:
Raff Tsai
2019-09-30 18:28:16 +08:00
parent 360d2f2c6f
commit 129c98bba1
7 changed files with 0 additions and 248 deletions

View File

@@ -74,7 +74,6 @@ public class DataUsageSummaryTest {
private TelephonyManager mTelephonyManager;
private Context mContext;
private FragmentActivity mActivity;
private SummaryLoader.SummaryProvider mSummaryProvider;
/**
* This set up is contrived to get a passing test so that the build doesn't block without tests.
@@ -96,9 +95,6 @@ public class DataUsageSummaryTest {
shadowTelephonyManager.setTelephonyManagerForSubscriptionId(1, mTelephonyManager);
mActivity = spy(Robolectric.buildActivity(FragmentActivity.class).get());
doReturn(mNetworkStatsManager).when(mActivity).getSystemService(NetworkStatsManager.class);
mSummaryProvider = DataUsageSummary.SUMMARY_PROVIDER_FACTORY
.createSummaryProvider(mActivity, mSummaryLoader);
}
@Test
@@ -110,20 +106,6 @@ public class DataUsageSummaryTest {
assertThat(formattedUsage).isEqualTo(formattedInIECUnit);
}
@Test
public void setListening_shouldBlankSummaryWithNoSim() {
ShadowDataUsageUtils.HAS_SIM = false;
mSummaryProvider.setListening(true);
verify(mSummaryLoader).setSummary(mSummaryProvider, null);
}
@Test
public void setListening_shouldSetSummaryWithSim() {
ShadowDataUsageUtils.HAS_SIM = true;
mSummaryProvider.setListening(true);
verify(mSummaryLoader).setSummary(anyObject(), endsWith(" of data used"));
}
@Test
@Config(shadows = ShadowSubscriptionManager.class)
public void configuration_withSim_shouldShowMobileAndWifi() {