From 567ee1d9f81025e2e45f3bdbc15f4e1f4eb5856b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=80=E6=BC=93=E4=B8=A8Sevtinge?= <89193494+Sevtinge@users.noreply.github.com> Date: Mon, 27 May 2024 21:53:20 +0800 Subject: [PATCH] fix: systemui - control center - hide delimiter, cc doesnt display spaces --- .../hook/systemui/controlcenter/HideDelimiter.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/HideDelimiter.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/HideDelimiter.java index 582a678ff3..c3760bd6b1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/HideDelimiter.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/HideDelimiter.java @@ -50,15 +50,8 @@ protected void before(MethodHookParam param) { @Override protected void before(MethodHookParam param) { String mCurrentCarrier = (String) XposedHelpers.getObjectField(param.thisObject, "mCurrentCarrier"); - StringBuilder stringBuffer = new StringBuilder(); - for (int i = 0; i < mCurrentCarrier.length(); i++) { - char ch = mCurrentCarrier.charAt(i); - if (" ".equals(String.valueOf(ch)) || "|".equals(String.valueOf(ch))) { - continue; - } - stringBuffer.append(ch); - } - XposedHelpers.setObjectField(param.thisObject, "mCurrentCarrier", operator ? stringBuffer.toString() : ""); + String updatedCarrier = mCurrentCarrier.replace(" | ", ""); + XposedHelpers.setObjectField(param.thisObject, "mCurrentCarrier", operator ? updatedCarrier : ""); } } );