summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Chang <vichang@google.com>2023-12-07 15:54:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-12-07 15:54:26 +0000
commitbc7df575015a90b5bb45a902201eaf52e71b7b25 (patch)
treeb54a1d263cae369edc0f0dd9a93531d2124647bf
parenteef74ce4edc2b92942412e8589ffee763d55b919 (diff)
parent28c113d299ac9f608c4a05f6db953f77d732795d (diff)
downloadbase-bc7df575015a90b5bb45a902201eaf52e71b7b25.tar.gz
Merge "Remove Unicode whitespace before AM/PM in the status bar" into main
-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)