Merge tm-qpr-dev-plus-aosp-without-vendor@9467136

Bug: 264720040
Merged-In: Ie7623a4b6fd2101fb6acd5be7584a9e4cbf0e3e4
Change-Id: Ie8c4ea8ea264bf6be78b96df3aba1d5828a90aed
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";