Add TetherConfigParcel to improve tetherStartWithConfiguration
tetherStartWithConfiguration doesn't take a configuration, it
takes a boolean. But for extensibility purposes, it should
take some sort of configuration parcel. This is because in
AIDL, once we add a method we cannot ever change its signature
or add parameters, because there cannot be two methods with the
same name. Create a new parcel to improve this.
Bug: 145777247
Test: atest FrameworksNetTests
Test: atest netd_integration_test:BinderTest#TetherStartStopStatus
Test: build, flash, on/off tethering
Change-Id: I0d34a25fc9a187e218d37a058b8316ea2423a5da
diff --git a/server/NetdNativeService.h b/server/NetdNativeService.h
index 72b85ef..12dbd37 100644
--- a/server/NetdNativeService.h
+++ b/server/NetdNativeService.h
@@ -121,8 +121,7 @@
binder::Status tetherGetStats(
std::vector<android::net::TetherStatsParcel>* tetherStatsVec) override;
binder::Status tetherStart(const std::vector<std::string>& dhcpRanges) override;
- binder::Status tetherStartWithConfiguration(
- bool usingLegacyDnsProxy, const std::vector<std::string>& dhcpRanges) override;
+ binder::Status tetherStartWithConfiguration(const TetherConfigParcel& config) override;
binder::Status tetherStop() override;
binder::Status tetherIsEnabled(bool* enabled) override;
binder::Status tetherInterfaceAdd(const std::string& ifName) override;