[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
Showing
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt 18 additions, 0 deletions...temui/statusbar/pipeline/mobile/data/MobileInputLogger.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt 6 additions, 0 deletions...line/mobile/data/repository/MobileConnectionRepository.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt 4 additions, 0 deletions...le/data/repository/demo/DemoMobileConnectionRepository.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoModeMobileConnectionDataSource.kt 2 additions, 0 deletions...ata/repository/demo/DemoModeMobileConnectionDataSource.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/model/FakeNetworkEventModel.kt 1 addition, 0 deletions...obile/data/repository/demo/model/FakeNetworkEventModel.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt 7 additions, 0 deletions...data/repository/prod/CarrierMergedConnectionRepository.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt 9 additions, 0 deletions...le/data/repository/prod/FullMobileConnectionRepository.kt
- packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt 52 additions, 0 deletions...le/data/repository/prod/MobileConnectionRepositoryImpl.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt 2 additions, 0 deletions.../mobile/data/repository/FakeMobileConnectionRepository.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionParameterizedTest.kt 11 additions, 1 deletion.../repository/demo/DemoMobileConnectionParameterizedTest.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt 3 additions, 0 deletions...ta/repository/demo/DemoMobileConnectionsRepositoryTest.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt 3 additions, 0 deletions...ata/repository/prod/FullMobileConnectionRepositoryTest.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt 45 additions, 0 deletions...le/data/repository/prod/MobileConnectionRepositoryTest.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt 3 additions, 0 deletions...ta/repository/prod/MobileConnectionTelephonySmokeTests.kt
- packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt 1 addition, 0 deletions...e/data/repository/prod/MobileConnectionsRepositoryTest.kt
Please register or sign in to comment