summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-01-16 00:23:46 +0900
committerLorenzo Colitti <lorenzo@google.com>2021-01-16 00:56:44 +0900
commit0ea563f4af29e50bbdf2cb3d731dba574bd21796 (patch)
tree5bcf6a8d7388373295df6a99beb4f937354888f2 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentc5f2057d02e20a53ed735e462af6f2b68b4833af (diff)
Mark several NetworkAgentInfo members @NonNull and address TODO.
1. network cannot be null because it's final and the only caller of the constructor passes in a fresh copy. 2. linkProperties cannot be null because: - The only caller of the constructor passes in a fresh copy. - The only assignment to nai.linkProperties is in updateLinkProperties, and that dereferences newLp a few lines before assigning it. 3. networkCapabilities cannot be null because: - The only caller of the constructor passes in a fresh copy. - There are no direct assignments to nai.networkCapabilities. - All 4 assignments happen via getAndSetNetworkCapabilities: - registerNetworkAgentInternal, updateCapabilities and applyBackgroundChangeForRematch all pass in the return value of mixInCapabilities, which is always non-null. - updateNetworkInfo re-assigns the capabilities that were already set in the object. 4. networkAgentConfig cannot be null because it's final and the only caller of the NetworkAgentInfo constructor passes in a fresh copy. Address a TODO in ConnectivityService to remove a check for the nai's capabilities being null. Also fix a style nit pointed out by the linter. Test: atest FrameworksNetTests Change-Id: I2e265f1c60a73d6da0222dd6711bc53c32db06ec
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions