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

Commit a9dd79ba authored by LuK1337's avatar LuK1337
Browse files

SystemUI: Use mContext.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: I4629cf6c8312f008d23a3e35370f2b9287710b57
parent dc0c974e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -424,7 +424,7 @@ public class BatteryMeterDrawable extends Drawable implements
        }

        final int drawableResId = getBatteryDrawableResourceForStyle(style);
        mBatteryDrawable = (LayerDrawable) res.getDrawable(drawableResId);
        mBatteryDrawable = (LayerDrawable) mContext.getDrawable(drawableResId);
        mFrameDrawable = mBatteryDrawable.findDrawableByLayerId(R.id.battery_frame);
        mFrameDrawable.setTint(mCurrentBackgroundColor != 0
                ? mCurrentBackgroundColor : res.getColor(R.color.batterymeter_frame_color));
@@ -444,7 +444,7 @@ public class BatteryMeterDrawable extends Drawable implements
        final int resId = getBatteryDrawableResourceForStyle(style);
        final Drawable batteryDrawable;
        try {
            batteryDrawable = res.getDrawable(resId);
            batteryDrawable = mContext.getDrawable(resId);
        } catch (Resources.NotFoundException e) {
            throw new BatteryMeterDrawableException(res.getResourceName(resId) + " is an " +
                    "invalid drawable", e);