Merge "Remove dependencies on hidden network stats APIs"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f962acdb70
@@ -439,7 +439,6 @@ public class AppDataUsageTest {
|
|||||||
assertThat(mFragment.mTemplate.getMatchRule())
|
assertThat(mFragment.mTemplate.getMatchRule())
|
||||||
.isEqualTo(NetworkTemplate.MATCH_WIFI);
|
.isEqualTo(NetworkTemplate.MATCH_WIFI);
|
||||||
assertTrue(mFragment.mTemplate.getSubscriberIds().isEmpty());
|
assertTrue(mFragment.mTemplate.getSubscriberIds().isEmpty());
|
||||||
assertThat(mFragment.mTemplate.getNetworkId())
|
assertTrue(mFragment.mTemplate.getWifiNetworkKeys().isEmpty());
|
||||||
.isEqualTo(NetworkTemplate.WIFI_NETWORKID_ALL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,8 +81,8 @@ public class DataUsageLibTest {
|
|||||||
when(mSubscriptionManager.isActiveSubscriptionId(SUB_ID)).thenReturn(false);
|
when(mSubscriptionManager.isActiveSubscriptionId(SUB_ID)).thenReturn(false);
|
||||||
|
|
||||||
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID)).isTrue();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID)).isTrue();
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID_2)).isFalse();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID_2)).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -94,8 +94,8 @@ public class DataUsageLibTest {
|
|||||||
.thenReturn(new String[] {SUBSCRIBER_ID});
|
.thenReturn(new String[] {SUBSCRIBER_ID});
|
||||||
|
|
||||||
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID)).isTrue();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID)).isTrue();
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID_2)).isFalse();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID_2)).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -107,7 +107,7 @@ public class DataUsageLibTest {
|
|||||||
.thenReturn(new String[] {SUBSCRIBER_ID, SUBSCRIBER_ID_2});
|
.thenReturn(new String[] {SUBSCRIBER_ID, SUBSCRIBER_ID_2});
|
||||||
|
|
||||||
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
final NetworkTemplate networkTemplate = DataUsageLib.getMobileTemplate(mContext, SUB_ID);
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID)).isTrue();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID)).isTrue();
|
||||||
assertThat(networkTemplate.matchesSubscriberId(SUBSCRIBER_ID_2)).isTrue();
|
assertThat(networkTemplate.getSubscriberIds().contains(SUBSCRIBER_ID_2)).isTrue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user