Don't wait for brightness changes

On some devices, changing the brightness is quite slow, because the
change needs to wait for the vsync signal. However, when we are also
running a brightness change animation, as soon as the last change has
been sent there is a new one pending, leading to that we never reach
"clean" state in the PowerManagerService and thus we don't notify
clients about the state change, which can delay the animation for waking
up while dozing by as much as a second.

To fix this, if we only issue a brightness change, we don't block on
that because it's not relevant for us.

Bug: 22879546
Change-Id: Idad7e90c436bfbc38581fe8ce24d606e432b7952
1 file changed