Fix system caller cannot query stats for other uids
Follow-up from aosp/3249945. If the system caller queries stats
for other UIDs, the caller would get UNSUPPORTED.
This follows the official documentation, where the API would
not return stats for all other UIDs.
However, partners or other legacy callers might already depend
on this undocumented behavior. Changing this behavior might
damage existing apps.
Thus, this change reverts the behavior change introduced at
aosp/3249945 and allows a system caller to query stats for
other UIDs.
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.TrafficStatsTest
Bug: 372851500
Change-Id: Ia7ea051f7b0b6349ffcb890c300362bbfbdee3dc
2 files changed