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

Commit ffefb88c authored by LuK1337's avatar LuK1337 Committed by Luca Stefani
Browse files

fixup! SystemUI: Bring back good ol' circle battery style

* Bring back forced BatteryMeterView.MODE_ESTIMATE for
  quick settings as people /really/ do miss it.

Change-Id: I6706f7e211c205789a43850116dabcc9ae990e8f
parent 5c9d2e88
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -408,8 +408,10 @@ public class BatteryMeterView extends LinearLayout implements
        final boolean showing = mBatteryPercentView != null;
        final int showBatteryPercent = LineageSettings.System.getIntForUser(
                getContext().getContentResolver(), STATUS_BAR_SHOW_BATTERY_PERCENT, 0, mUser);
        final boolean drawPercentInside = showBatteryPercent == 1;
        final boolean drawPercentOnly = showBatteryPercent == 2;
        final boolean drawPercentInside = mShowPercentMode == MODE_DEFAULT &&
                showBatteryPercent == 1;
        final boolean drawPercentOnly = mShowPercentMode == MODE_ESTIMATE ||
                showBatteryPercent == 2;
        if (drawPercentOnly && (!drawPercentInside || mCharging) ||
                mBatteryStyle == BATTERY_STYLE_TEXT) {
            mCircleDrawable.setShowPercent(false);
+3 −1
Original line number Diff line number Diff line
@@ -249,7 +249,9 @@ public class QuickStatusBarHeader extends RelativeLayout implements

        // Tint for the battery icons are handled in setupHost()
        mBatteryRemainingIcon = findViewById(R.id.batteryRemainingIcon);

        // QS will always show the estimate, and BatteryMeterView handles the case where
        // it's unavailable or charging
        mBatteryRemainingIcon.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE);
        mRingerModeTextView.setSelected(true);
        mNextAlarmTextView.setSelected(true);