Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ebf8044 authored by Raff Tsai's avatar Raff Tsai
Browse files

Fix arabic language % character in wrong place

info.batteryPercentString is applied language format.
We don't need to format it again in BidiFormatter.

Fixes: 136699046
Test: visual
Change-Id: Ie89823c23fd23bd6a9a97821f3062cad4dfb3709
parent 5939f737
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.settings.fuelgauge;

import android.content.Context;
import android.text.BidiFormatter;

import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
@@ -79,15 +78,14 @@ public class TopLevelBatteryPreferenceController extends BasePreferenceControlle
            return null;
        }
        CharSequence label;
        final BidiFormatter formatter = BidiFormatter.getInstance();
        if (!info.discharging && info.chargeLabel != null) {
            label = info.chargeLabel;
        } else if (info.remainingLabel == null) {
            label = info.batteryPercentString;
        } else {
            label = context.getString(R.string.power_remaining_settings_home_page,
                    formatter.unicodeWrap(info.batteryPercentString),
                    formatter.unicodeWrap(info.remainingLabel));
                    info.batteryPercentString,
                    info.remainingLabel);
        }
        return label;
    }