commit | de214f40cfb2d929ed6be9e2b636328238f5ae9c | [log] [tgz] |
---|---|---|
author | Jason Monk <jmonk@google.com> | Fri Aug 12 17:04:45 2016 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Fri Aug 12 17:04:47 2016 +0000 |
tree | c045b8c38cc322f0cfb0d7543504b07d2fee5684 | |
parent | 34910458c474defc2646e48666d9478ef3fc10f5 [diff] | |
parent | b5ece9a9d6add01b7a0c392372ff8ba061fcb7e7 [diff] |
Merge "Start listening on notifications/QS panels on expansion started" into nyc-mr1-dev
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainer.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainer.java index ac90ce7..19a5d52 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSContainer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainer.java
@@ -237,6 +237,10 @@ mQSPanel.setListening(mListening && mQsExpanded); } + public void setHeaderListening(boolean listening) { + mHeader.setListening(listening); + } + public void setQsExpansion(float expansion, float headerTranslation) { if (DEBUG) Log.d(TAG, "setQSExpansion " + expansion + " " + headerTranslation); mQsExpansion = expansion;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index 385b835..fef8930 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -246,10 +246,12 @@ if (mListening) { refreshAllTiles(); } - if (listening) { - mBrightnessController.registerCallbacks(); - } else { - mBrightnessController.unregisterCallbacks(); + if (mBrightnessView.getVisibility() == View.VISIBLE) { + if (listening) { + mBrightnessController.registerCallbacks(); + } else { + mBrightnessController.unregisterCallbacks(); + } } }
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 d3ab392..f4b41bb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1617,6 +1617,9 @@ if (mQsExpanded) { onQsExpansionStarted(); } + // Since there are QS tiles in the header now, we need to make sure we start listening + // immediately so they can be up to date. + mQsContainer.setHeaderListening(true); } @Override