Loading core/java/android/widget/DatePickerCalendarDelegate.java +5 −1 Original line number Diff line number Diff line Loading @@ -302,7 +302,11 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate { // Update the date formatter. mMonthDayFormat = DateFormat.getInstanceForSkeleton("EMMMd", locale); mMonthDayFormat.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE mMonthDayFormat.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mYearFormat = DateFormat.getInstanceForSkeleton("y", locale); // Update the header text. Loading core/java/android/widget/SimpleMonthView.java +5 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,11 @@ class SimpleMonthView extends View { private void updateMonthYearLabel() { final String format = DateFormat.getBestDateTimePattern(mLocale, MONTH_YEAR_FORMAT); final SimpleDateFormat formatter = new SimpleDateFormat(format, mLocale); formatter.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE formatter.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mMonthYearLabel = formatter.format(mCalendar.getTime()); } Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +5 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,11 @@ public class KeyguardSliceProvider extends SliceProvider implements if (mDateFormat == null) { final Locale l = Locale.getDefault(); DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mDateFormat = format; } mCurrentTime.setTime(System.currentTimeMillis()); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java +5 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,11 @@ public class DateView extends TextView { if (mDateFormat == null) { final Locale l = Locale.getDefault(); DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mDateFormat = format; } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/VariableDateViewController.kt +6 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,11 @@ internal fun getFormatFromPattern(pattern: String?): DateFormat { } val l = Locale.getDefault() val format = DateFormat.getInstanceForSkeleton(pattern, l) format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE) // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE) return format } Loading Loading
core/java/android/widget/DatePickerCalendarDelegate.java +5 −1 Original line number Diff line number Diff line Loading @@ -302,7 +302,11 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate { // Update the date formatter. mMonthDayFormat = DateFormat.getInstanceForSkeleton("EMMMd", locale); mMonthDayFormat.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE mMonthDayFormat.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mYearFormat = DateFormat.getInstanceForSkeleton("y", locale); // Update the header text. Loading
core/java/android/widget/SimpleMonthView.java +5 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,11 @@ class SimpleMonthView extends View { private void updateMonthYearLabel() { final String format = DateFormat.getBestDateTimePattern(mLocale, MONTH_YEAR_FORMAT); final SimpleDateFormat formatter = new SimpleDateFormat(format, mLocale); formatter.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE formatter.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mMonthYearLabel = formatter.format(mCalendar.getTime()); } Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +5 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,11 @@ public class KeyguardSliceProvider extends SliceProvider implements if (mDateFormat == null) { final Locale l = Locale.getDefault(); DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mDateFormat = format; } mCurrentTime.setTime(System.currentTimeMillis()); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java +5 −1 Original line number Diff line number Diff line Loading @@ -114,7 +114,11 @@ public class DateView extends TextView { if (mDateFormat == null) { final Locale l = Locale.getDefault(); DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE); // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE); mDateFormat = format; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/VariableDateViewController.kt +6 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,11 @@ internal fun getFormatFromPattern(pattern: String?): DateFormat { } val l = Locale.getDefault() val format = DateFormat.getInstanceForSkeleton(pattern, l) format.setContext(DisplayContext.CAPITALIZATION_FOR_STANDALONE) // The use of CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE instead of // CAPITALIZATION_FOR_STANDALONE is to address // https://unicode-org.atlassian.net/browse/ICU-21631 // TODO(b/229287642): Switch back to CAPITALIZATION_FOR_STANDALONE format.setContext(DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE) return format } Loading