Skip to content
Snippets Groups Projects
  1. Oct 13, 2023
    • Evan Laird's avatar
      [Sb] Add prioritize_latency tracking in mobile connections · 502ec035
      Evan Laird authored
      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
      502ec035
  2. Oct 10, 2023
Loading