Don't check for UPDATE_DEVICE_STATS if the caller is the system server.
Checking permissions requires a binder IPC to the system server.
If the system server's thread pool is full, and all the threads
in the pool blocked waiting for us to complete, we will deadlock.
Fix this by not doing the permission check if the caller is
the system server. From a security perspective there is no
difference because the system server always has all permissions.
Bug: 69389492
Test: walleye builds, boots
Test: netd_{unit,integration}_test pass
Change-Id: Ica8c389d943562b3a7c5b5c2e985b2fa052bdb1e
2 files changed