android_packages_modules_Co.../tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Remi NGUYEN VAN 9133888e0c Ensure callbacks are run properly on executor
NsdManager callbacks were run on a provided executor by capturing the
handler message in a lambda, but the message will be recycled
immediately after handleMessage returns. This means that any non-inline
executor would see bogus callbacks, as they have an empty Message. Fix
it by not capturing the Message in the lambda, but capturing its
contents instead.
This was broken when updating the class to support executors in change
ID: I4c31e2d7ae601ea808b1fd64df32d116c6fff97f; before that, callbacks
were all run on the NsdManager handler.

Also, DelegatingDiscoveryListener is being run on the NsdManager handler
thread for notifyAllServicesLost, causing onServiceLost to be run there,
but other methods are run on the provided Executor, even though they
access maps maintained on the handler thread, like mPerNetworkListeners.

Revert DelegatingDiscoveryListener to run on the handler thread as
before, and only use the provided executor to execute any app-facing
callback instead.

Bug: 234419509
Test: atest NsdManagerTest

Change-Id: Icca64511b02dad2f725a2849d2a1e871135b3286
2022-06-02 18:16:42 +09:00
..
common Revert "Autogenerate connectivity jarjar rules" 2022-05-18 18:30:27 +00:00
cts Ensure callbacks are run properly on executor 2022-06-02 18:16:42 +09:00
deflake Enable/disable FrameworksNetTests 2021-10-01 19:29:50 +08:00
integration Revert "Autogenerate connectivity jarjar rules" 2022-05-18 18:30:27 +00:00
mts bpf_existence_test: block & dscp_policy progs require 5.4+ kernel 2022-05-19 08:06:41 +00:00
native Merge "ConnectivityNativeBinderTest: Check Kernel Version" 2022-04-21 00:00:14 +00:00
smoketest Update tests for NetworkStats code move. 2022-02-28 04:17:13 +00:00
unit Merge changes I8e806b3b,I5e8e4673,Id2a078da 2022-05-24 03:34:25 +00:00