wifi data usage: Update calling API name am: c71f2d7425

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1957863

Change-Id: Ia82f93a8616ccbe9d6a24d921250b0249625e2db
This commit is contained in:
Les Lee 2022-01-23 00:47:11 +00:00 • committed by Automerger Merge Worker
commit 6b90540d28
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ class NetworkTemplateTest {
oemManaged: Int = OEM_NONE,
metered: Boolean = true
): NetworkStateSnapshot {
`when`(mockWifiInfo.getCurrentNetworkKey()).thenReturn(wifiKey)
`when`(mockWifiInfo.getNetworkKey()).thenReturn(wifiKey)
val lp = LinkProperties()
val caps = NetworkCapabilities().apply {
setCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED, !metered)

View file

@ -266,7 +266,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
mServiceContext = new MockContext(context);
when(mLocationPermissionChecker.checkCallersLocationPermission(
any(), any(), anyInt(), anyBoolean(), any())).thenReturn(true);
when(sWifiInfo.getCurrentNetworkKey()).thenReturn(TEST_WIFI_NETWORK_KEY);
when(sWifiInfo.getNetworkKey()).thenReturn(TEST_WIFI_NETWORK_KEY);
mStatsDir = TestIoUtils.createTemporaryDirectory(getClass().getSimpleName());
PowerManager powerManager = (PowerManager) mServiceContext.getSystemService(