Process all accesses to TetheringMetrics on the handler thread

Since calling NetworkStatsManager.queryDetailsForUidTagState may
be blocked for up to 20 seconds, potentially leading to enable
Tethering failure, a handler thread is added to process this task
and prevent blocking.

Furthermore, thread safety is ensured for all accesses to the class
by the internal handler thread.

Bug: 282861165
Test: atest TetheringTests
Change-Id: I38d055e5c3f8dbb22eac97f858d4f56925e8ab36
2 files changed