Fix casting issue in use of ICU Measures
Bug: 19418509
Bug: 33670388
Bug: 33750033
Test: manual
Change-Id: I286cfed0cfe34166bd1fd1982089a11eb556fc44
diff --git a/core/java/android/widget/Chronometer.java b/core/java/android/widget/Chronometer.java
index 444ebc5..6c6079f 100644
--- a/core/java/android/widget/Chronometer.java
+++ b/core/java/android/widget/Chronometer.java
@@ -361,7 +361,7 @@
measures.add(new Measure(s, MeasureUnit.SECOND));
return MeasureFormat.getInstance(Locale.getDefault(), FormatWidth.WIDE)
- .formatMeasures((Measure[]) measures.toArray());
+ .formatMeasures(measures.toArray(new Measure[measures.size()]));
}
@Override