Fix testCallback fail caused by lacking of looper
For T- devices, the registerUsageCallback invocation without
a handler needs a looper from the thread that calls into
the API, which is not available in the test.
Thus, skip related checks if the sdk level is below T.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest#testCallback
on R device
Bug: 218845894
Ignore-AOSP-First: Required APIs are not in downstream of AOSP yet
Change-Id: I89f391297e8c7108d3e790a3d2da7b373f7b4012
1 file changed