summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionRequest.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-01-15 23:35:16 +0900
committerLorenzo Colitti <lorenzo@google.com>2021-02-01 16:12:04 +0900
commitd8cc12a87bd7a87e961fdc080d0e07a1a6a0c400 (patch)
tree07b31e9cc05e66efdbe99893b516ca782103d222 /telecomm/java/android/telecom/ConnectionRequest.java
parentcfc5ab2f25be16301cd94208066f1f8adf32ad35 (diff)
Remove getFilteredNetworkState and add @NonNull in NetworkState.
getFilteredNetworkState is only used in two places, both of which use only small parts of the NetworkState that is returned to them. Remove the method and replace it with inline code in the two callers. NetworkState is a fairly expensive object, and this removes the need to perform lots of defensive copies of data that the caller does not need. Also remove the only call to the NetworkState constructor in ConnectivityService. That leaves only one caller to the NetworkState constructor, the one in NetworkAgentInfo. This constructor is called with defensive copies of NetworkInfo, LinkProperties, and NetworkCapabilities, so mark these three parameters as @NonNull. It's also called with a non-null Network, because NetworkAgentInfo is only constructed with non-null Networks, so mark the network parameter @NonNull as well. In order to make the arguments in the NetworkState constructor @NonNull, introduce a new constructor that sets everything to null and make NetworkState.EMPTY call it. Test: atest FrameworksNetTests Change-Id: Idcc9e32c53533b0cf61494517e62d4c184fa7610
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionRequest.java')
0 files changed, 0 insertions, 0 deletions