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

Unverified Commit 3e39d48f authored by LuK1337's avatar LuK1337
Browse files

fixup! frameworks/base: Lights notifications brightness support

Change-Id: I86e1b93152882e79512570899604d2cb49b4dce1
parent 283adef7
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -408,7 +408,16 @@ public class LightsService extends SystemService {
            try {
                if (mVintfLights != null) {
                    HwLightState lightState = new HwLightState();
                    if (mBrightnessLevel > 0 && mBrightnessLevel <= 0xFF) {
                        int colorAlpha = color >>> 24;
                        if (colorAlpha == 0x00) {
                            colorAlpha = 0xFF;
                        }
                        colorAlpha = (colorAlpha * mBrightnessLevel) / 0xFF;
                        lightState.color = (colorAlpha << 24) + (color & 0x00FFFFFF);
                    } else {
                        lightState.color = color;
                    }
                    lightState.flashMode = (byte) mode;
                    lightState.flashOnMs = onMS;
                    lightState.flashOffMs = offMS;