Import updated Android SetupCompat Library 390541785 am: 51e6ea6654
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/setupcompat/+/15545209
Change-Id: Ic83ae67a9f328ed6ad015e4df4852b23f048c753
diff --git a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
index ea54745..3583b93 100644
--- a/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
+++ b/main/java/com/google/android/setupcompat/util/BuildCompatUtils.java
@@ -17,6 +17,7 @@
package com.google.android.setupcompat.util;
import android.os.Build;
+import androidx.annotation.ChecksSdkIntAtLeast;
/**
* An util class to check whether the current OS version is higher or equal to sdk version of
@@ -25,6 +26,16 @@
public final class BuildCompatUtils {
/**
+ * Implementation of BuildCompat.isAtLeastS() suitable for use in Setup
+ *
+ * @return Whether the current OS version is higher or equal to S.
+ */
+ @ChecksSdkIntAtLeast(api = Build.VERSION_CODES.S)
+ public static boolean isAtLeastS() {
+ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.S;
+ }
+
+ /**
* 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
@@ -40,10 +51,10 @@
* <p>Supported configurations:
*
* <ul>
- * <li>For current Android release: while new API is not finalized yet (CODENAME = "S", SDK_INT
- * = 30|31)
- * <li>For current Android release: when new API is finalized (CODENAME = "REL", SDK_INT = 31)
- * <li>For next Android release (CODENAME = "T", SDK_INT = 30+)
+ * <li>For current Android release: while new API is not finalized yet (CODENAME = "T", SDK_INT
+ * = 31|32)
+ * <li>For current Android release: when new API is finalized (CODENAME = "REL", SDK_INT = 32)
+ * <li>For next Android release (CODENAME = "U", SDK_INT = 33+)
* </ul>
*
* <p>Note that Build.VERSION_CODES.S cannot be used here until final SDK is available in all
@@ -52,13 +63,13 @@
*
* @return Whether the current OS version is higher or equal to S.
*/
- public static boolean isAtLeastS() {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
+ public static boolean isAtLeastT() {
+ if (!isAtLeastS()) {
return false;
}
- return (Build.VERSION.CODENAME.equals("REL") && Build.VERSION.SDK_INT >= 31)
+ return (Build.VERSION.CODENAME.equals("REL") && Build.VERSION.SDK_INT >= 32)
|| (Build.VERSION.CODENAME.length() == 1
- && Build.VERSION.CODENAME.charAt(0) >= 'S'
+ && Build.VERSION.CODENAME.charAt(0) >= 'T'
&& Build.VERSION.CODENAME.charAt(0) <= 'Z');
}
diff --git a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigKey.java b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigKey.java
index a3df178..3020eea 100644
--- a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigKey.java
+++ b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigKey.java
@@ -499,8 +499,8 @@
String KEY_LOADING_LAYOUT_HEADER_HEIGHT = "loading_layout_header_height";
// A margin top of the content frame of progress bar.
- String KEY_PROGRESS_BAR_MARGIN_TOP = "progress_bar_margin_top";
+ String KEY_PROGRESS_BAR_MARGIN_TOP = "setup_design_progress_bar_margin_top";
// A margin bottom of the content frame of progress bar.
- String KEY_PROGRESS_BAR_MARGIN_BOTTOM = "progress_bar_margin_bottom";
+ String KEY_PROGRESS_BAR_MARGIN_BOTTOM = "setup_design_progress_bar_margin_bottom";
}