[Sb] Add prioritize_latency tracking in mobile connections
This CL adds a network callback -- registered via ConnectivityManager -- for every mobile subscription that we know about. This amounts to one listeners per subId (more on that below). The network callback is registered only to receive information about _that_ subId's network pertaining to the NET_CAPABILITY_PRIORITIZE_LATENCY. We'll use this flag downstream to determine whether or not to show a network slice attribution. On ConnectivityManager's callback list: The docs on ConnectivityManagerService claims that we should be careful about too many callbacks registered with the system. If we need to get rid of the 1:1 mapping from subscription to registrant, then we would have to do some work to register a _single_ callback that maintained a map of <netId, networkCapabilities>. It would also presumably have to be eagerly listening, and make sure to update the map whenever a network disappears Note that this doesn't actually give us a huge performance benefit from what I can tell. This is because our single registrant would still get a callback-per-network in which the capabilities changed. Therefore, we still get the penalty of N incoming IPCs when there are N networks that meet the criteria. So we only should worry about that in the case where we run close to the limit of 100 subscribers per process. Test: tests in statusbar/pipeline Bug: 270385675 Change-Id: If42b52ad6e14bdc258c90761e3e6dd629bbe9d3d
Loading
Please register or sign in to comment