Use ThrowingSupplier for visibleOnHandlerThread.

In order to return values from functions that are run on the handler
thread, use a ThrowingSupplier instead of a ThrowingRunnable.
Also maintain the case with ThrowingRunnable by overloading.

Bug: 281646074
Bug: 283885097
Test: NetworkStaticLibTests
(cherry picked from https://android-review.googlesource.com/q/commit:e51b449da4dfb751652be93b5a88b424e682e9cb)
Merged-In: Ic1b86f9f764997ce5d6848f04185194a961d1106
Change-Id: Ic1b86f9f764997ce5d6848f04185194a961d1106
2 files changed
tree: 90f0404edc70c1bbb354024cfe2ed56b01020438
  1. client-libs/
  2. common/
  3. .gitignore
  4. OWNERS
  5. PREUPLOAD.cfg
  6. TEST_MAPPING