summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2022-02-28 17:22:35 -0800
committerColin Cross <ccross@android.com>2022-02-28 18:02:59 -0800
commitef48689e323b1dbfaee8f8502d720a9b10c93f09 (patch)
tree88f5ffef321f8d72034d0de4d1c3eafdf15ce947 /core/java
parent7a25b6f3791431aa5c0aa7b4424036588d739307 (diff)
Add Build.Version.RELEASE_OR_PREVIEW_DISPLAY
Build.Version.RELEASE_OR_PREVIEW_DISPLAY propagates a string that contains a user-friendly version name for preview releases, or the Build.Version.RELEASE version for final releases. Test: manual Bug: 221950960 Change-Id: I31f8f67996e3e5e7edc00704b16b8df0db17d3a3
Diffstat (limited to 'core/java')
-rwxr-xr-xcore/java/android/os/Build.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 545ae38c38c0..03492aa56631 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -285,13 +285,20 @@ public class Build {
public static final String RELEASE = getString("ro.build.version.release");
/**
- * The version string we show to the user; may be {@link #RELEASE} or
- * {@link #CODENAME} if not a final release build.
+ * The version string. May be {@link #RELEASE} or {@link #CODENAME} if
+ * not a final release build.
*/
@NonNull public static final String RELEASE_OR_CODENAME = getString(
"ro.build.version.release_or_codename");
/**
+ * The version string we show to the user; may be {@link #RELEASE} or
+ * a descriptive string if not a final release build.
+ */
+ @NonNull public static final String RELEASE_OR_PREVIEW_DISPLAY = getString(
+ "ro.build.version.release_or_preview_display");
+
+ /**
* The base OS build the product is based on.
*/
public static final String BASE_OS = SystemProperties.get("ro.build.version.base_os", "");