Fix the brightness key being ignored during the animation
Review Request #125182 - Created Sept. 12, 2015 and submitted
There is a check that update the m_cachedBrightness, which is not valid during the animation. Ignore if the brightness animation is running and calculate the new brightness level.
P.S. Why is this check there anyway? Is it useful or it's designed to workaround some hardware issue?
Brightness can increase/decrease for every brightness key press.
(from bug 350676)
The reason that I don't want to update the cachedBrightness is, other usage of it shows that it always keeps real hardware brightness value with in it is used to whether to send brightness changed signal or not. From existing code, it seems that the code tries to avoid querying hardware value frequently and send a lot of brightness changed during animation.
What I want to say is following: even if cache fails and by some reason hardware didn't notify backend about changed brightness (AFAICS that's the only use-case for that check, except bugs like this) and we only found out it when key was pressed, we shouldn't ignore that keypress. It is definitely a bad user experience; I believe there is no need in that check at all.