Remove the need of root access when force polling network stats
In host side test, the only way to trigger force polling is through
dumpsys netstats --poll. However, this needs permissions that could
not be obtained by shell. Hence, obtaining root access is needed.
However, CTS also runs on user builds so obtaining root access is
not always a feasible option.
Thus, this change delegate the operation to app which doesn't need
any privilege to request for polling.
Test: atest android.cts.statsd.atom.UidAtomTests#testMobileBytesTransfer
Test: atest android.cts.statsd.atom.UidAtomTests#testMobileBytesTransferByFgBg
Bug: 153174569
Change-Id: I517865beabcfc9ef15b82a8f5100382764ee0396
Merged-In: I517865beabcfc9ef15b82a8f5100382764ee0396
(cherry picked from commit 5d1d7e495228333686d7fee7bfacc2a378244e09)
3 files changed