2a84d1cbcf3893bf381cb7910889e8815f508a7a
Registered requests are not keyed by PendingIntents in ConnectivityService, which means that unregistering a request with a PendingIntent causes a linear search in all registered requests. testNetworkRequestMaximum was registering too many PendingIntents simultaneously, causing the unregistration loop to have n^2 complexity and to take a long time to take effect. To make the unregistering loop less likely to trigger a timeout on waitForIdle, this patch changes the test to not register MAX_REQUEST number of PendingIntent, but instead mixes a small number of PendingIntents with NetworkCallbacks to reach MAX_REQUEST number of simultaneously registered requests. When unregistering these requests, callbacks are unregistered first. Bug: 32561414 Test: runtest frameworks-net Change-Id: I48b882c884abe20b388190b7f28baee293446f37
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%