AOD: Fix wakeup transition jank

No longer do the upwards animation from AOD1, because there is a fade in instead now.

Also, because the DozeService gets finished when waking up, we were disallowing
animations again. Instead, we now ignore disallowing animations while waking up.

Also don't cancel the NotificationPanelView wakeup animation when another identical
request comes in.

Also adds tracing for various SystemUI states.

Bug: 63531607
Test: Wake up from AOD1. Ensure there is no jank or flicker
Change-Id: I383ffa320f28ac4bf5432e4f4f5c06372717f66f
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 0c62096..cca6ae0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -232,6 +232,7 @@
     private int mAmbientIndicationBottomPadding;
     private boolean mIsFullWidth;
     private float mDarkAmount;
+    private float mDarkAmountTarget;
     private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
     private boolean mNoVisibleNotifications = true;
     private ValueAnimator mDarkAnimator;
@@ -2590,8 +2591,13 @@
             return;
         }
         if (mDarkAnimator != null && mDarkAnimator.isRunning()) {
-            mDarkAnimator.cancel();
+            if (animate && mDarkAmountTarget == darkAmount) {
+                return;
+            } else {
+                mDarkAnimator.cancel();
+            }
         }
+        mDarkAmountTarget = darkAmount;
         if (animate) {
             mDarkAnimator = ObjectAnimator.ofFloat(this, SET_DARK_AMOUNT_PROPERTY, darkAmount);
             mDarkAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);