Fix SettingsRoboTests build error with OpenJDK 9

- CL http://ag/3671365 broke git_pi-release/marlin-userdebug-jdk9
  when building "m checkbuild". It shouldn't break the image build

Test: m SettingsRoboTests
ROBOTEST_FILTER=com.android.settings.datetime.timezone
EXPERIMENTAL_USE_OPENJDK9=true USE_R8=true
Change-Id: I161c0350cff55bd13ba4a6c63df4e4e9bc4b1a5f
This commit is contained in:
Victor Chang
2018-03-05 16:13:33 +00:00
parent 22a39c2b93
commit e10875210a
3 changed files with 3 additions and 86 deletions

View File

@@ -73,13 +73,13 @@ public class TimeZoneDataTest {
CountryTimeZones US = mock(CountryTimeZones.class);
when(US.getCountryIso()).thenReturn("us");
when(US.getTimeZoneMappings()).thenReturn(Arrays.asList(
new CountryTimeZones.TimeZoneMapping("Unknown/Secret_City", true),
new CountryTimeZones.TimeZoneMapping("Unknown/Secret_City2", false)
TimeZoneMapping.createForTests("Unknown/Secret_City", true),
TimeZoneMapping.createForTests("Unknown/Secret_City2", false)
));
CountryTimeZones GB = mock(CountryTimeZones.class);
when(GB.getCountryIso()).thenReturn("gb");
when(GB.getTimeZoneMappings()).thenReturn(Collections.singletonList(
new TimeZoneMapping("Unknown/Secret_City", true)
TimeZoneMapping.createForTests("Unknown/Secret_City", true)
));
when(mCountryZonesFinder.lookupCountryTimeZonesForZoneId("Unknown/Secret_City"))
.thenReturn(Arrays.asList(US, GB));