Use Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY for user visible versions

Use Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY which will show a user
friendly version name for preview releases, and the release version
for final releases.

Bug: 221950960
Test: manual
Change-Id: I3a7e6a3c996d52614b89888afd35da8cff458b43
This commit is contained in:
Colin Cross
2022-02-28 17:24:16 -08:00
parent 3340b8e3c3
commit 3f67f87efe
7 changed files with 8 additions and 8 deletions

View File

@@ -89,7 +89,7 @@ public class SystemUpdatePreferenceController extends BasePreferenceController {
@Override
public CharSequence getSummary() {
CharSequence summary = mContext.getString(R.string.android_version_summary,
Build.VERSION.RELEASE_OR_CODENAME);
Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY);
final FutureTask<Bundle> bundleFutureTask = new FutureTask<>(
// Put the API call in a future to avoid StrictMode violation.
() -> mUpdateManager.retrieveSystemUpdateInfo());