4e0d0e2f7bc64bbd6795f66bd3d39e022b5769eb
NsdManagerTest relies on the lastMessage variable to assert the connection of a client to the service. The asserts in test are done on a different thread, although the variable was not qualified volatile, which creates the chance to read a stale value. This patch fixes this race by marking the variable volatile. Bug: 32561414 Bug: 62044295 Test: NsdManagerTest works Change-Id: I0bc2cd8059c6ff8b78a2dda0ba8d6bc7e13ef951
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%