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

Commit 1974da95 authored by Clark Scheff's avatar Clark Scheff Committed by Gerrit Code Review
Browse files

Revert "SysUI: Fix coloring of battery drawables"

This reverts commit 453e8f21.

Going to re-do this since the colors need to be cached so when the user changes styles we apply the correct tinting

Change-Id: I7bcd70d4464eac5a7869a3e237d19be8629310f5
parent c7e7c09c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -20,10 +20,9 @@
    android:viewportWidth="24"
    android:viewportHeight="24">

    <!-- Path will be tinted based on dual tone color -->
    <path
        android:name="frame"
        android:strokeColor="#000000"
        android:strokeColor="@color/batterymeter_frame_color"
        android:strokeLineJoin="round"
        android:strokeWidth="3"
        android:pathData="@string/battery_circle_path"/>
+1 −2
Original line number Diff line number Diff line
@@ -24,9 +24,8 @@
        android:name="mask"
        android:pathData="@string/battery_landscape_clip_path" />

    <!-- Path will be tinted based on dual tone color -->
    <path
        android:name="frame"
        android:fillColor="#000000"
        android:fillColor="@color/batterymeter_frame_color"
        android:pathData="M 1 4 H 25 V 20 H 1 V 4 Z" />
</vector>
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -24,10 +24,9 @@
        android:name="mask"
        android:pathData="@string/battery_portrait_clip_path" />

    <!-- Path will be tinted based on dual tone color -->
    <path
        android:name="frame"
        android:fillColor="#000000"
        android:fillColor="@color/batterymeter_frame_color"
        android:pathData="M19,2v19H5V2H19z" />

</vector>
 No newline at end of file
+2 −5
Original line number Diff line number Diff line
@@ -537,9 +537,7 @@ public class BatteryMeterView extends View implements DemoMode,
        @Override
        public void setDarkIntensity(int backgroundColor, int fillColor) {
            mIconTint = fillColor;
            // make bolt drawable tint fully opaque so it stands out
            mBoltDrawable.setTint(0xff000000 | fillColor);
            mFrameDrawable.setTint(backgroundColor);
            mBoltDrawable.setTint(fillColor);
            updateBoltDrawableLayer(mBatteryDrawable, mBoltDrawable);
            invalidate();
        }
@@ -662,8 +660,7 @@ public class BatteryMeterView extends View implements DemoMode,
                    && (mShowPercent && !(level == 100 && !SHOW_100_PERCENT))) {
                // draw the percentage text
                String pctText = String.valueOf(SINGLE_DIGIT_PERCENT ? (level/10) : level);
                // make paint color fully opaque so text stands out better
                mTextAndBoltPaint.setColor(0xff000000 | getColorForLevel(level));
                mTextAndBoltPaint.setColor(getColorForLevel(level));
                canvas.drawText(pctText, mTextX, mTextY, mTextAndBoltPaint);
            } else if (level <= mCriticalLevel) {
                // draw the warning text