Exclude PID for rate-limited

rate-limited would include PID in current design, which means that
an app can ignore the rate-limits by creating a process (a new PID)
every time. Thus, maintain mOpenSessionCallsPerUid for rate-limits
and OpenSessionKey for debugging.

Also, there's no rate-limit for SYSTEM_UID so if the uid is SYSTEM_UID,
the mLastStatsSessionPoll should not be updated. Otherwise, it may
cause an app to be rate-limited to do a query after a system user
polled.

Test: adb shell dumpsys netstats and check the output
Bug: 228081549
Change-Id: I69cc1f3990c9960347691256ed4cb500f9bb48b2
(cherry picked from commit 8d5907fc13bd6238a2eaa56c1d80488c42a2d564)
Merged-In: I69cc1f3990c9960347691256ed4cb500f9bb48b2
1 file changed