Fix CTS CarPerfMgrTest flakiness.

If the current thread priority is not one of SCHED_DEFAULT, SCHED_FIFO
or SCHED_RR, getThreadPriority will throw IllegalStateException which
will fail the test. Modify the test to capture the exception and
skip the test if this happens.

Test: atest android.car.cts.CarPerformanceManagerTest
Bug: 272150354
Change-Id: Iddb71a262f30d0f35ce0602ff64c1cd9282bc225
1 file changed