From 260c1f7c631bf44c3966041adb20abfc8659e4a4 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 7 Aug 2017 15:52:26 +0200 Subject: [PATCH] AOD: Fix shelf animating when it should not 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 --- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 4bbe895da7ca..291ec1a322aa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -3714,6 +3714,9 @@ public class NotificationStackScrollLayout extends ViewGroup * 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; -- 2.11.0