summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Victor Chang <vichang@google.com> 2023-12-06 22:38:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-12-06 22:38:42 +0000
commitfe49bee8b99df965094e12ee74f1eb09b93c3ccd (patch)
tree29eda2809c7d3aa4236c7573bc396f43228e1b51
parent536524c05810620f863f4d717c83ca3b3b40bfcf (diff)
parentc6def223a4b58560a1576b20d89e3d35877e6a5e (diff)
Merge "Remove Unicode whitespace before AM/PM in the status bar" into udc-dev-plus-aosp
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 6875b523a962..ea140cb99d19 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -24,6 +24,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.TypedArray;
import android.graphics.Rect;
+import android.icu.lang.UCharacter;
import android.icu.text.DateTimePatternGenerator;
import android.os.Bundle;
import android.os.Handler;
@@ -452,7 +453,7 @@ public class Clock extends TextView implements
if (a >= 0) {
// Move a back so any whitespace before AM/PM is also in the alternate size.
final int b = a;
- while (a > 0 && Character.isWhitespace(format.charAt(a-1))) {
+ while (a > 0 && UCharacter.isUWhiteSpace(format.charAt(a - 1))) {
a--;
}
format = format.substring(0, a) + MAGIC1 + format.substring(a, b)