Merge "Merge 24Q3 to AOSP main" into main
diff --git a/apex/tests/AndroidTest.xml b/apex/tests/AndroidTest.xml
index 1e8286a..2e23740 100644
--- a/apex/tests/AndroidTest.xml
+++ b/apex/tests/AndroidTest.xml
@@ -38,5 +38,7 @@
<option name="mainline-module-package-name" value="com.google.android.tzdata4" />
<!-- This module is found on U devices. -->
<option name="mainline-module-package-name" value="com.google.android.tzdata5" />
+ <!-- This module is found on V devices. -->
+ <option name="mainline-module-package-name" value="com.google.android.tzdata6" />
</object>
</configuration>
diff --git a/apex/tests/src/java/android/tzdata/mts/TimeZoneVersionTest.java b/apex/tests/src/java/android/tzdata/mts/TimeZoneVersionTest.java
index 0d2790e..a03241f 100644
--- a/apex/tests/src/java/android/tzdata/mts/TimeZoneVersionTest.java
+++ b/apex/tests/src/java/android/tzdata/mts/TimeZoneVersionTest.java
@@ -44,6 +44,9 @@
@Test
public void timeZoneModuleIsCompatibleWithThisRelease() throws Exception {
String majorVersion = readMajorFormatVersionFromModuleVersionFile();
+
+ // Each time a release version of Android is declared, this list needs to be updated to
+ // map the Android release to the time zone format version it uses.
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) {
assertEquals("003", majorVersion);
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) {
@@ -56,13 +59,22 @@
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.TIRAMISU) {
assertEquals("006", majorVersion);
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
- // TODO Hack for master, which will have the same API level as U until the next
- // release API is finalized.
- if (VersionInfo.ICU_VERSION.getMajor() > 72) {
- // V is expected to be *.x.
- assertEquals("008", majorVersion);
+ assertEquals("007", majorVersion);
+ } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.VANILLA_ICE_CREAM) {
+ // The "main" branch is also the staging area for the next Android release that won't
+ // have an Android release constant yet. Instead, we have to infer what the expected tz
+ // data set version should be when the SDK_INT identifies it as the latest Android release
+ // in case it is actually the "main" branch. Below we assume that an increment to ICU is
+ // involved with each release of Android and requires an tz data set version increment.
+ // TODO(b/319103072) A future tzdata module will be installed to a range of Android
+ // releases. This test might beed to be reworked because the ICU version may no longer
+ // imply the tz data set to expect.
+ if (VersionInfo.ICU_VERSION.getMajor() > 75) {
+ // ICU version in V is 75. When we update it in a next release major version
+ // should be updated too.
+ assertEquals("009", majorVersion);
} else {
- assertEquals("007", majorVersion);
+ assertEquals("008", majorVersion);
}
} else {
// If this fails, a new API level has likely been finalized and can be made