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

Commit d3cd41ed authored by DvTonder's avatar DvTonder
Browse files

Framework: Forward port Battery light support and fixes

Change-Id: Ic81d3ffb7548c7b7e34ffecd2f9db781f13b705d
parent 5fda2d4d
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -696,22 +696,12 @@ public final class BatteryService extends Binder {
    private final class Led {
        private final LightsService.Light mBatteryLight;

        private final int mBatteryLowARGB;
        private final int mBatteryMediumARGB;
        private final int mBatteryFullARGB;
        private final int mBatteryLedOn;
        private final int mBatteryLedOff;

        public Led(Context context, LightsService lights) {
            mBatteryLight = lights.getLight(LightsService.LIGHT_ID_BATTERY);

            mBatteryLowARGB = mContext.getResources().getInteger(
                    com.android.internal.R.integer.config_notificationsBatteryLowARGB);
            mBatteryMediumARGB = mContext.getResources().getInteger(
                    com.android.internal.R.integer.config_notificationsBatteryMediumARGB);
            mBatteryFullARGB = mContext.getResources().getInteger(
                    com.android.internal.R.integer.config_notificationsBatteryFullARGB);

            // Does the Device support changing battery LED colors?
            mMultiColorLed = context.getResources().getBoolean(
                    com.android.internal.R.bool.config_multiColorBatteryLed);