Fix ICUServiceThreadTest flakiness

Sometimes getVisibleIDs() method returns a null reference which might happend
because of inaccurate concurrent access. This CL attempts to fix this
ICUServiceThreadTest flakiness.

Bug: 129457872
Test: cts-tradefed run commandAndExit cts-dev -m CtsIcuTestCases -t android.icu.dev.test.util.ICUServiceTest
Change-Id: Ia802465eca7a4fbc25abb11b090abfb4b2fef451
2 files changed