Remove ConnectivityManager swapActiveStatsMap API

swapActiveStatsMap is temporary added for the NetworkStatsFactory to
call BpfNetMaps#swapActiveStatsMap in tethering mainline module. Now
NetworkStatsFactory already be mainlined, calling BpfNetMaps#swapActiveStatsMap
directly.

Bug: 218494448
Test: atest ConnectivityCoverageTests
      atest FrameworksNetTests
Change-Id: I3358e4ac5fb7ed0964273afdbccd1b4128ca7645
This commit is contained in:
markchien
2022-03-01 15:22:20 +08:00
parent 9edd999725
commit 49e944cc1c
7 changed files with 8 additions and 51 deletions

View File

@@ -5818,27 +5818,4 @@ public class ConnectivityManager {
throw e.rethrowFromSystemServer();
}
}
/**
* Request to change the current active network stats map.
* STOPSHIP: Remove this API before T sdk finalized, this API is temporary added for the
* NetworkStatsFactory which is platform code but will be moved into connectivity (tethering)
* mainline module.
*
* @throws IllegalStateException if swapping active stats map failed.
* @hide
*/
@SystemApi(client = MODULE_LIBRARIES)
@RequiresPermission(anyOf = {
android.Manifest.permission.NETWORK_SETTINGS,
android.Manifest.permission.NETWORK_STACK,
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
})
public void swapActiveStatsMap() {
try {
mService.swapActiveStatsMap();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}