Make sure endClosing doesn't get called too early

Bug: 22196478
Bug: 22184101
Change-Id: I3488c40b74a080efbba9b1544f9709f7e509988b
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 39a06aa..9343172 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -834,8 +834,10 @@
             }
         } else if (!isFullyCollapsed() && !mTracking && !mClosing) {
             cancelHeightAnimator();
-            mClosing = true;
             notifyExpandingStarted();
+
+            // Set after notifyExpandingStarted, as notifyExpandingStarted resets the closing state.
+            mClosing = true;
             if (delayed) {
                 mNextCollapseSpeedUpFactor = speedUpFactor;
                 postDelayed(mFlingCollapseRunnable, 120);