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

Commit f6259111 authored by LuK1337's avatar LuK1337 Committed by Tim Schumacher
Browse files

SystemUI: Use Context.getDrawable for battery icon

Fixes:
02-11 13:36:21.859 28053 28053 W Resources: Drawable com.android.systemui:drawable/ic_battery_portrait
has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or
Context.getDrawable(int).

Change-Id: Ia8b639e7710e81b4b9408baeac80efabcb2c2303
parent 954696cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@ public class BatteryMeterView extends View implements DemoMode,
            final int resId = getBatteryDrawableResourceForMode(mode);
            final Drawable batteryDrawable;
            try {
                batteryDrawable = res.getDrawable(resId);
                batteryDrawable = getContext().getDrawable(resId);
            } catch (Resources.NotFoundException e) {
                throw new BatteryMeterDrawableException(res.getResourceName(resId) + " is an " +
                        "invalid drawable", e);
@@ -634,7 +634,7 @@ public class BatteryMeterView extends View implements DemoMode,
            }

            int drawableResId = getBatteryDrawableResourceForMode(mode);
            mBatteryDrawable = (LayerDrawable) res.getDrawable(drawableResId);
            mBatteryDrawable = (LayerDrawable) getContext().getDrawable(drawableResId);
            mFrameDrawable = mBatteryDrawable.findDrawableByLayerId(R.id.battery_frame);
            mFrameDrawable.setTint(mCurrentBackgroundColor != 0
                    ? mCurrentBackgroundColor