Merge "Use Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY for user visible versions" am: 9c59242102
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2003011
Change-Id: If31ca44328dd6794977bba78e7c07d89e7d1c796
diff --git a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
index d6cf442..880843e 100644
--- a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceController.java
@@ -75,7 +75,7 @@
@Override
public CharSequence getSummary() {
- return Build.VERSION.RELEASE_OR_CODENAME;
+ return Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY;
}
@Override
diff --git a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceController.java b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceController.java
index eefa1f9..6cf02a0 100644
--- a/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceController.java
+++ b/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceController.java
@@ -34,6 +34,6 @@
@Override
public CharSequence getSummary() {
- return Build.VERSION.RELEASE_OR_CODENAME;
+ return Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY;
}
}
diff --git a/src/com/android/settings/deviceinfo/storage/StorageUtils.java b/src/com/android/settings/deviceinfo/storage/StorageUtils.java
index 9b52fe8..22ad854 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageUtils.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageUtils.java
@@ -219,7 +219,7 @@
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity())
.setMessage(getContext().getString(R.string.storage_detail_dialog_system,
- Build.VERSION.RELEASE_OR_CODENAME))
+ Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY))
.setPositiveButton(android.R.string.ok, null)
.create();
}
diff --git a/src/com/android/settings/system/SystemUpdatePreferenceController.java b/src/com/android/settings/system/SystemUpdatePreferenceController.java
index 92819d6..b2a22ff 100644
--- a/src/com/android/settings/system/SystemUpdatePreferenceController.java
+++ b/src/com/android/settings/system/SystemUpdatePreferenceController.java
@@ -89,7 +89,7 @@
@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());
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceControllerTest.java
index 9fca65d..2d68014 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionDetailPreferenceControllerTest.java
@@ -63,7 +63,7 @@
@Test
public void getSummary_shouldGetBuildVersion() {
- assertThat(mController.getSummary()).isEqualTo(Build.VERSION.RELEASE_OR_CODENAME);
+ assertThat(mController.getSummary()).isEqualTo(Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY);
}
@Test
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceControllerTest.java
index 903b88b..a0f59a5 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/FirmwareVersionPreferenceControllerTest.java
@@ -65,6 +65,6 @@
public void updatePreference_shouldSetSummaryToBuildNumber() {
mController.updateState(mPreference);
- assertThat(mPreference.getSummary()).isEqualTo(Build.VERSION.RELEASE_OR_CODENAME);
+ assertThat(mPreference.getSummary()).isEqualTo(Build.VERSION.RELEASE_OR_PREVIEW_DISPLAY);
}
}
diff --git a/tests/robotests/src/com/android/settings/system/SystemUpdatePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/system/SystemUpdatePreferenceControllerTest.java
index 95c95bb..61aa294 100644
--- a/tests/robotests/src/com/android/settings/system/SystemUpdatePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/system/SystemUpdatePreferenceControllerTest.java
@@ -139,7 +139,7 @@
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 @@
assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.android_version_pending_update_summary));
}
-}
\ No newline at end of file
+}