Skip to content
Commit af8d85fa authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Junyu Lai
Browse files

[SP20] Check signature permission when accessing network stats provider

Currently, registerNetworkStatsProvider requires the
UPDATE_DEVICE_STATS permission. This is a privileged permission
so it can be granted to preinstalled apps. Thus, apps like
GmsCore, or preinstalled apps will be able to update network stats.

This change checks for a new permission that would only allow
signature apps to declare that. Also check
MAINLINE_NETWORK_STACK permission to allow NetworkStack process
to use it.

Test: adb shell dumpsys netstats
Test: atest FrameworksNetTests
Bug: 149652079

Change-Id: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Iaecbf10a7610461bd52e315659006c7332c416e6
Merged-In: Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b
(cherry picked from commit e9e8d8f9)
parent 031f0212
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment