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

Commit 9a681582 authored by Evan Laird's avatar Evan Laird
Browse files

[bat] use battery charging fg color for chip bg

This helps with contrast for the battery plugged-in animation for the
compose battery. It's always green for now, so we can always use
the foreground color to ensure contrast.

Test: manual; unplug and replug the device
Bug: 399560295
Flag: com.android.settingslib.flags.new_status_bar_icons
Flag: com.android.systemui.status_bar_root_modernization
Change-Id: I7b228c0747a14ddd168bbdd3fa3d25c94a90443e
parent c7ed4da1
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2023 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="@dimen/ongoing_appops_chip_bg_corner_radius" />
    <!--  Use the battery charging fg color, since the battery will
          always be charging in this chip see BatteryColors.kt -->
    <solid android:color="#162100" />
</shape>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -95,6 +95,6 @@ constructor(level: Int, context: Context, attrs: AttributeSet? = null) :

    @SuppressLint("UseCompatLoadingForDrawables")
    private fun updateResources() {
        roundedContainer.background = mContext.getDrawable(R.drawable.statusbar_chip_bg)
        roundedContainer.background = mContext.getDrawable(R.drawable.statusbar_battery_chip_bg)
    }
}