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

Commit 5cec0d34 authored by Xuebo Li's avatar Xuebo Li Committed by Gerrit - the friendly Code Review server
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: 933506
parent 730c5264
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -296,5 +296,7 @@
    <!-- Duration of the expansion animation in the volume dialog -->
    <item name="volume_expand_animation_duration" type="integer">300</item>

    <!-- 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
@@ -104,7 +104,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() {