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

Commit 296a682a authored by Xuebo Li's avatar Xuebo Li Committed by Linux Build Service Account
Browse files

SystemUI: Show percentage of battery

Customize whether to show the battery level in the status bar
of keyguard. Carrier can customize the boolean resource to
show it by default.

Change-Id: I0b05525db3847ea5bdd77c77b66655a4107bd37c
CRs-Fixed: 1037633
parent 4ee833d2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -295,5 +295,8 @@

    <!-- When true, show charging animation -->
    <bool name="config_show_battery_charging_anim">true</bool>

    <!-- Whether or not to show battery level text. -->
    <bool name="config_showBatteryPercentage">false</bool>
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -149,7 +149,9 @@ public class KeyguardStatusBarView extends RelativeLayout
        } else if (mMultiUserSwitch.getParent() == this && mKeyguardUserSwitcherShowing) {
            removeView(mMultiUserSwitch);
        }
        mBatteryLevel.setVisibility(mBatteryCharging ? View.VISIBLE : View.GONE);
        boolean showBatteryLevel = getResources().getBoolean(R.bool.config_showBatteryPercentage);
        mBatteryLevel.setVisibility(
                mBatteryCharging || showBatteryLevel ? View.VISIBLE : View.GONE);
    }

    private void updateSystemIconsLayoutParams() {