summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-03-02 23:28:49 +0900
committerLorenzo Colitti <lorenzo@google.com>2021-03-03 01:02:35 +0900
commit2d23f53029f06576ba2d7cc04b05e94ac4bffea3 (patch)
treeb02245bb40e3b5c3520babd6e0e8dbefe9d104b8 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parent3d31f1ead0151b55a5e493b58ad22adcc15c78eb (diff)
Isolate an ad-hoc legacy API codepath.
The legacy API getNetworkInfo(int type) is expected to return NetworkInfo objects for all network types supported by the device even when those network types are not connected. This requires a lot of fabrication because all the data structures in ConnectivityService store information about connected networks, not networks that don't exist. Worse, the current behaviour is to return BLOCKED instead of DISCONNECTED if background data is restricted. This obviously makes no sense, because a disconnected network cannot be blocked, and because if that network type did connect and was unmetered (e.g., Wi-Fi), it would no longer be BLOCKED. This complicates the code, forcing several methods to deal with a special case of null NetworkCapabilities, no NetworkAgentInfo, etc. Fix this by isolating this outlandish behaviour to its own method. This allows the main codepaths not to have to support this unusual and not very useful edge case. Bug: 174123988 Test: pure refactoring, passes existing tests Change-Id: Ia52b24c59024c8f6e63e584b864e0225cb572090
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions