Merge "[automerger skipped] Merge Android 13 QPR1 am: e3ba45fd2f -s ours" into stage-aosp-master am: bdc8e3f473 -s ours
am skip reason: Merged-In I62825661a5b260c3612420536e4d830341886a9c with SHA-1 2bc2bf601f is already in history
Original change: https://android-review.googlesource.com/c/platform/external/setupcompat/+/2337860
Change-Id: I15eeb19366d393a86e409e6ad5edcf002f93da1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
index 3c4e2a2..090e1df 100644
--- a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
+++ b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
@@ -34,6 +34,7 @@
public static boolean isAtLeastR() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.R;
}
+
/**
* Implementation of BuildCompat.isAtLeastS() suitable for use in Setup
*
@@ -45,6 +46,16 @@
}
/**
+ * Implementation of BuildCompat.isAtLeastT() suitable for use in Setup
+ *
+ * @return Whether the current OS version is higher or equal to T.
+ */
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.TIRAMISU)
+ public static boolean isAtLeastT() {
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU;
+ }
+
+ /**
* Implementation of BuildCompat.isAtLeast*() suitable for use in Setup
*
* <p>BuildCompat.isAtLeast*() can be changed by Android Release team, and once that is changed it
@@ -60,26 +71,24 @@
* <p>Supported configurations:
*
* <ul>
- * <li>For current Android release: while new API is not finalized yet (CODENAME = "Tiramisu",
- * SDK_INT = 33)
- * <li>For current Android release: when new API is finalized (CODENAME = "REL", SDK_INT = 32)
- * <li>For next Android release (CODENAME = "U", SDK_INT = 34+)
+ * <li>For current Android release: while new API is not finalized yet (CODENAME =
+ * "UpsideDownCake", SDK_INT = 33)
+ * <li>For current Android release: when new API is finalized (CODENAME = "REL", SDK_INT = 34)
+ * <li>For next Android release (CODENAME = "V", SDK_INT = 35+)
* </ul>
*
* <p>Note that Build.VERSION_CODES.T cannot be used here until final SDK is available in all
* channels, because it is equal to Build.VERSION_CODES.CUR_DEVELOPMENT before API finalization.
*
- * @return Whether the current OS version is higher or equal to T.
+ * @return Whether the current OS version is higher or equal to U.
*/
- public static boolean isAtLeastT() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
- return true;
- }
- return (Build.VERSION.CODENAME.equals("REL") && Build.VERSION.SDK_INT >= 33)
+ public static boolean isAtLeastU() {
+ System.out.println("Build.VERSION.CODENAME=" + Build.VERSION.CODENAME);
+ return (Build.VERSION.CODENAME.equals("REL") && Build.VERSION.SDK_INT >= 34)
|| (Build.VERSION.CODENAME.length() == 1
- && Build.VERSION.CODENAME.charAt(0) >= 'T'
+ && Build.VERSION.CODENAME.charAt(0) >= 'U'
&& Build.VERSION.CODENAME.charAt(0) <= 'Z')
- || (Build.VERSION.CODENAME.equals("Tiramisu") && Build.VERSION.SDK_INT >= 32);
+ || (Build.VERSION.CODENAME.equals("UpsideDownCake") && Build.VERSION.SDK_INT >= 33);
}
private BuildCompatUtils() {}
diff --git a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
index 0db37ae..1b73098 100644
--- a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
+++ b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
@@ -46,7 +46,6 @@
private static final String TAG = PartnerConfigHelper.class.getSimpleName();
- @VisibleForTesting
public static final String SUW_AUTHORITY = "com.google.android.setupwizard.partner";
@VisibleForTesting public static final String SUW_GET_PARTNER_CONFIG_METHOD = "getOverlayConfig";