Fix AdbService/AdbDebuggingManager race conditon
There is an infinite loop caused by AdbService and adbd fighting each other when setting and listening the value of system property ADB_WIFI_ENABLED. The infinite loop only breaks when a race condition allows adbd to finish before AdbService, resulting in tls port = 0 (which cause the UI to not display a port). This bug occurs 100% of the time if "Always allow" is not checked, since the only way for the loop to exit is when the verifyWifi and sys property ADB_WIFI_ENABLED "agree" on zero. If "Always allow" is checked the loop is allowed to run again which results in a the port number not being displayed sporadically. Solution: Both the infinite loop and the race condition can be avoided if adbd message don't set ADB_WIFI_ENABLED (this was already obvserved in AdbService). Test: manual Fixes: 413335715 Flag: EXEMPT bugfix Change-Id: If7655959db7e4b42bff1188a132203449e13bec7
Loading
Please register or sign in to comment