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

Commit 4083acb8 authored by Heemin Seog's avatar Heemin Seog Committed by Automerger Merge Worker
Browse files

Merge "Address lifecycle crash in car sysui" into rvc-dev am: c42d4b65

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12163205

Change-Id: I97234d1e503bcd822e8e614772d77306ae2066cf
parents 40b66a14 c42d4b65
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -31,10 +31,4 @@
        android:gravity="center_vertical"
        android:orientation="horizontal"
    />

    <com.android.systemui.BatteryMeterView
        android:id="@+id/battery"
        android:layout_width="0dp"
        android:layout_height="match_parent"
    />
</LinearLayout>
 No newline at end of file
+0 −4
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.widget.LinearLayout;
import androidx.annotation.IdRes;

import com.android.settingslib.Utils;
import com.android.systemui.BatteryMeterView;
import com.android.systemui.R;
import com.android.systemui.plugins.DarkIconDispatcher;

@@ -49,10 +48,7 @@ public class CarStatusBarHeader extends LinearLayout {
        float intensity = colorForeground == Color.WHITE ? 0f : 1f;
        Rect tintArea = new Rect(0, 0, 0, 0);

        applyDarkness(R.id.battery, tintArea, intensity, colorForeground);
        applyDarkness(R.id.clock, tintArea, intensity, colorForeground);

        ((BatteryMeterView) findViewById(R.id.battery)).setForceShowPercent(true);
    }

    private void applyDarkness(@IdRes int id, Rect tintArea, float intensity, int color) {