This commit has almost no behavior changes, because:
1. usage of networkCapabilitiesRestrictedForCallerPermissions is
either wrapped by
createWithLocationInfoSanitizedIfNecessaryWhenParceled or
getNetworkCapabilitiesInternal.
2. All usages of getNetworkCapabilitiesInternal is either wrapped by
createWithLocationInfoSanitizedIfNecessaryWhenParceled or the
redacted info in the return value is not used by its caller
3. The only exception for getNetworkCapabilitiesInternal is that it is
used in simulateDataStall() which checks the underlying network but
underlying network in the NetworkCapabilities can be redacted by
networkCapabilitiesRestrictedForCallerPermissions. Removing redaction
from getNetworkCapabilitiesInternal() will loose the current permission
requirement but this is wanted as the existing implementation has
stricter permission requirements than the API signature declares and
this CL fixes it
Bug: 374037595
Flag: NONE no behavior change but only bug fix
Change-Id: I80491d26ed7d11cb3fe1850ef7be9ae7600d5dd5