Android 9.0.0 Release 49 (5794013)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXZfS8AAKCRDorT+BmrEO
eIKuAJ41tMlgjA9z1OY2kx12pFIqi6vSygCdGPhmE9sYTWo/bBc+NaOo7OZZu7A=
=f2Yk
-----END PGP SIGNATURE-----
Fix DnsTlsSocket fast shutdown path

Previously, DnsTlsSocket's destructor told the loop thread to
perform a clean shutdown by closing an IPC file descriptor.
However, the IPC file descriptor is now an eventfd, which does
not alert the listening thread when it is closed.

This change uses the eventfd counter's sign bit as an indication
that the destructor is requesting an immediate close.

Test: Includes regression test.
Bug: 123212403
Bug: 124058672
Bug: 122856181
Change-Id: I6edc26bf504cbfbba7d055b1f8e52ac70e02c6e0
Merged-In: I6edc26bf504cbfbba7d055b1f8e52ac70e02c6e0
(cherry picked from commit 83eccadc7e9d0ee0f75aab980cfdc2159c4c98a2)
3 files changed