Use ThrowingSupplier for visibleOnHandlerThread. am: b1d5f322dd am: 8859b6613e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/net/+/23670042

Change-Id: I0125f869f60344667c024845dfe7b301cec17600
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>