[MS30] Remove ServiceManager#getService dependency
Since TrafficStats is moving into the mainline module,
ServiceManager#getService can no longer be accessed.
This change use reflection to access getService, since
there is no offical way to get the service binder,
and TrafficStats is a static utility that doesn't have
the context to invoke Context#getSystemService.
This change also fixes minor lint errors.
Test: atest CtsNetTestCases:TrafficStatsTest
Bug: 204830222
Change-Id: I5caec42a71431b39f747fc791b8511d92e5cf7cc
1 file changed