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 : ""); } } );