Fix occasional jank when going to QS.

We change the listening state of the QS panel before the user
actually navigates there and when the animations are probably
not running (after expanding the panel).

Change-Id: Iad48b3459e7db09c423f6983a9fec17ec0088050
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 0720704..d152887 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -50,6 +50,7 @@
     private int mPanelPaddingBottom;
     private int mDualTileUnderlap;
     private boolean mExpanded;
+    private boolean mListening;
 
     private TileRecord mDetailRecord;
     private Callback mCallback;
@@ -100,9 +101,14 @@
         if (!mExpanded) {
             showDetail(false /*show*/, mDetailRecord);
         }
+    }
+
+    public void setListening(boolean listening) {
+        if (mListening == listening) return;
+        mListening = listening;
         for (TileRecord r : mRecords) {
-            r.tile.setListening(mExpanded);
-            if (mExpanded) {
+            r.tile.setListening(mListening);
+            if (mListening) {
                 r.tile.refreshState();
             }
         }