Fix invisible Keyguard

Bug: 17439581
Change-Id: Ie649af4a3455a650ab46372f1e5500b530a24f34
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 7261ea1..778f22b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -691,18 +691,20 @@
             mClosing = true;
             notifyExpandingStarted();
             if (delayed) {
-                postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        fling(0, false /* expand */);
-                    }
-                }, 120);
+                postDelayed(mFlingCollapseRunnable, 120);
             } else {
                 fling(0, false /* expand */);
             }
         }
     }
 
+    private final Runnable mFlingCollapseRunnable = new Runnable() {
+        @Override
+        public void run() {
+            fling(0, false /* expand */);
+        }
+    };
+
     public void expand() {
         if (DEBUG) logf("expand: " + this);
         if (isFullyCollapsed()) {
@@ -728,7 +730,9 @@
 
     public void instantExpand() {
         mInstantExpanding = true;
+        mUpdateFlingOnLayout = false;
         abortAnimations();
+        cancelPeek();
         if (mTracking) {
             onTrackingStopped(true /* expands */); // The panel is expanded after this call.
         }
@@ -761,6 +765,8 @@
         if (mHeightAnimator != null) {
             mHeightAnimator.cancel();
         }
+        removeCallbacks(mPostCollapseRunnable);
+        removeCallbacks(mFlingCollapseRunnable);
     }
 
     protected void startUnlockHintAnimation() {