summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-03-18 15:54:31 +0900
committerRemi NGUYEN VAN <reminv@google.com>2021-03-18 07:47:27 +0000
commit0c1a37b7ad9ebe9554afaf5e39cd29e83c3a4276 (patch)
tree3a7dfcbdfb8547ec625d0bb65757a9b34da61e2e /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent87eb49b62f655e1ce8fb791c88e3120955f880b1 (diff)
Expose isUidNetworkingBlocked and isUidRestrictedOnMeteredNetworks
These methods are used by ConnectivityService for synchronous calls such as getActiveNetworkInfo, isActiveNetworkMetered, etc. These calls must call into NPMS and acquire the NPMS lock because they are synchronous. They cannot use the stale copy of the policy rules maintained by ConnectivityService, because if they did, races like the following could occur: 1. App gets broadcast/callback/.... 2. App calls isActiveNetworkMetered or other synchronous method. 3. ConnectivityService's copy of the rules is out of date, so the call returns stale information that the UID is still blocked. 4. The app thinks it has no networking, and does not call the synchronous method again until some other event occurs, potentially much later. Bug: 176289731 Test: passes existing tests in ConnectivityServiceTest Change-Id: I4ad0ca60431fe3702be85332530b6e93728d55e7
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions