Skip to content

Commit b99b21b

Browse files
author
yuemingw
committed
Fix the string for incompatable OS version.
Should show "requires p" when the required sdk version > 27(O MR). Bug: 73098235 Test: Tested on TestDPC Change-Id: I05e8480c5532dd51215fc6ccf7f17cbebe491b2a
1 parent 7383502 commit b99b21b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/java/com/afwsamples/testdpc/common/preference/DpcPreferenceHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ public void disableIfConstraintsNotMet() {
220220
*/
221221
private CharSequence findConstraintViolation() {
222222
if (getDeviceSdkInt() < mMinSdkVersion) {
223-
// FIXME: Remove this special checking once O is out.
224-
if (mMinSdkVersion >= 26) {
223+
// FIXME: Remove this special checking once P is out.
224+
if (mMinSdkVersion > 27) {
225225
return mContext.getString(R.string.requires_preview_release);
226226
}
227227
return mContext.getString(R.string.requires_android_api_level, mMinSdkVersion);

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<!-- Reasons for disabling preferences -->
9696
<string name="requires_android_api_level">Requires API level
9797
<xliff:g id="api level">%d</xliff:g></string>
98-
<string name="requires_preview_release">Requires the Android O preview release</string>
98+
<string name="requires_preview_release">Requires the Android P preview release</string>
9999
<string name="requires">Requires\u0020</string>
100100
<string name="requires_delimiter">,\u0020</string>
101101
<string name="requires_or">\u0020or\u0020</string>

0 commit comments

Comments
 (0)