Simplify enums in BandwidthController.
1. Ensure that the code always uses all enum values. This
provides a clear compile-time error if a passed-in enum value
is not handled, and allows us to remove several default
case labels and unreachable error logging code.
2. Factor out to common functions the code that converts enum
values to parts of iptables command lines.
(cherry picked from commit d9db08c4a12d6a2953b597d39bb3ac37c43d3658)
Bug: 32073253
Test: netd_{unit,integration}_test pass
Change-Id: I7136055100dc312fa7cb8bba5506fe86412b1f4d
Merged-In: I7136055100dc312fa7cb8bba5506fe86412b1f4d
2 files changed