Fixes an issue where the shelf would animate downwards when going to AOD.
The issue is that setDark gets called in updateIsKeyguard even though nothing changed,
yet it still re-requests the dark transition. Consequently, when the keyguard goes dark
later, the requested transition executes and moves the shelf downwards.
Change-Id: I8c590aeb4f330d8c3c1b51285d899d5f6db36323
Fixes:
64412244
Test: Double tap on notification on AOD2; press power; verify shelf does not move downwards
* See {@link AmbientState#setDark}.
*/
public void setDark(boolean dark, boolean animate, @Nullable PointF touchWakeUpScreenLocation) {
+ if (mAmbientState.isDark() == dark) {
+ return;
+ }
mAmbientState.setDark(dark);
if (animate && mAnimationsEnabled) {
mDarkNeedsAnimation = true;