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

Unverified Commit 04dcb6ce authored by Adrian DC's avatar Adrian DC Committed by Michael Bestas
Browse files

LEDs Brightness: Rewrite the slider control without TunerService



 * In commit Iecafafabdaec82b3b3c72293bea865de48f0e90a,
    the TunerService was introduced to listen the notification
    brightness level and update the local value, however
    this introduces an infinite loop of write / updates
    creating heavy lags and preventing user changes

 * Rewrite the NotificationBrightnessController without
    a TunerService or the original ContentObserver
    in a more simple and logic way

 * On slider creation, registerCallbacks reads the user
    value set to the brightness, stores the maximum for
    preview, allowing user interaction to change the
    local value and notification preview. Then update
    the stored value on exit in unregisterCallbacks

 * Additionaly reduce the notification update delay
    to smoothen the brightness preview on slide

 * Also prevent the LightsService from sending down
    a brightness of 0 if alpha & brightness are low,
    as this defaults to full brightness in liblights
    and could happen with the previous way or if
    an application gives a low alpha channel

Change-Id: Ia795c38d6b0e57476ae633acf1ae1c1e1e220cd2
Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent 5be28206
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment