Add swapActiveStatsMap API for NetworkStatsFactory

This CL should be reverted 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.

Bug: 209935649
Test: atest CtsHostsideNetworkTests
Change-Id: I5894450f3089b2ea105722a18ddf8f1eed1c28a0
This commit is contained in:
markchien 2022-01-11 23:28:23 +08:00
commit 9c8061134c

View file

@ -10660,4 +10660,14 @@ public class ConnectivityService extends IConnectivityManager.Stub
throw new IllegalStateException(e);
}
}
@Override
public void swapActiveStatsMap() {
enforceNetworkStackOrSettingsPermission();
try {
mNetd.trafficSwapActiveStatsMap();
} catch (RemoteException | ServiceSpecificException e) {
throw new IllegalStateException(e);
}
}
}