Fixing the BandwidthController unit test
The BandwidthController unit test cannot directly use gCtrl->trafficCtrl
to check if the bpf stats feature is avaliable. Rewrite the
getBpfStatsStatus() function of BandwidthController so it is also
functioning when in BandwidthController unit tests.
Bug: 72111305
Test: ./netd_unit_test
Change-Id: Ie60ed384b7f8d42b8e1f3417949d46895bea6572
diff --git a/server/BandwidthController.h b/server/BandwidthController.h
index c8dad99..efacdce 100644
--- a/server/BandwidthController.h
+++ b/server/BandwidthController.h
@@ -33,6 +33,7 @@
BandwidthController();
int setupIptablesHooks();
+ static bool getBpfStatsStatus();
int enableBandwidthControl(bool force);
int disableBandwidthControl();