summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-14 01:08:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-14 01:08:25 +0000
commitd018b4137c9396bbb17a096e732f8bc2b0822c2c (patch)
tree707cfab162adea69ff90d2354b4244efc27585c4
parenta59c9aae0c4b990c3e6de9694da62c08b3afe093 (diff)
parent51e6ea6654ab88aae7c6ef9767ffb320cc8c027a (diff)
downloadsetupcompat-d018b4137c9396bbb17a096e732f8bc2b0822c2c.tar.gz
Snap for 7639977 from 51e6ea6654ab88aae7c6ef9767ffb320cc8c027a to sc-d2-release
Change-Id: Icf7ad81fde962b70a2956e45ff131ddb53290aeb
-rw-r--r--main/java/com/google/android/setupcompat/util/BuildCompatUtils.java27
-rw-r--r--partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigKey.java4
2 files changed, 21 insertions, 10 deletions
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 @@ import android.os.Build;
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 @@ public final class BuildCompatUtils {
* <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 @@ public final class BuildCompatUtils {
*
* @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 @@ public @interface PartnerConfigKey {
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";
}