Refactor CountryDetectorServiceTest

-Modify notifyReceivers_twoListenersRegistered_bothNotified() to
 support immediate callback info to listeners based on ag/20470367

Bug: 262325136
Test: atest FrameworksServicesTests
Change-Id: I1f0b6f8244cbace325fde30c1fbad21aca44a710
This commit is contained in:
Nagendra Prasad Nagarle Basavaraju
2022-12-13 04:14:30 +00:00
parent 3e42e7840e
commit 73afb9c01a

View File

@@ -179,8 +179,9 @@ public class CountryDetectorServiceTest {
mCountryDetectorService.systemRunning();
mCountryDetectorService.addCountryListener(countryListenerA);
mCountryDetectorService.addCountryListener(countryListenerB);
expect.that(countryListenerA.isNotified()).isFalse();
expect.that(countryListenerB.isNotified()).isFalse();
//Immediate Callback Info support at ag/20470367
expect.that(countryListenerA.isNotified()).isTrue();
expect.that(countryListenerB.isNotified()).isTrue();
mCountryDetectorService.notifyReceivers(country);
expect.that(countryListenerA.isNotified()).isTrue();