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

@@ -139,7 +139,7 @@ public class SystemUpdatePreferenceControllerTest {
assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.android_version_summary,
Build.VERSION.RELEASE_OR_CODENAME));
Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY));
}
@Test
@@ -168,4 +168,4 @@ public class SystemUpdatePreferenceControllerTest {
assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.android_version_pending_update_summary));
}
}
}