Start listening on notifications/QS panels on expansion started
am: b5ece9a9d6
Change-Id: I948930f17c1d0e08ba3d33ea5db48e3071b2fe03
This commit is contained in:
@@ -237,6 +237,10 @@ public class QSContainer extends FrameLayout {
|
||||
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;
|
||||
|
||||
@@ -246,10 +246,12 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
||||
if (mListening) {
|
||||
refreshAllTiles();
|
||||
}
|
||||
if (listening) {
|
||||
mBrightnessController.registerCallbacks();
|
||||
} else {
|
||||
mBrightnessController.unregisterCallbacks();
|
||||
if (mBrightnessView.getVisibility() == View.VISIBLE) {
|
||||
if (listening) {
|
||||
mBrightnessController.registerCallbacks();
|
||||
} else {
|
||||
mBrightnessController.unregisterCallbacks();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1617,6 +1617,9 @@ public class NotificationPanelView extends PanelView implements
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user