Collapse QS panel after details if we expanded it before
Change-Id: I7de2ec3b304649fbce688ef6d54573cc7c2f4b64 Fixes: 27747650
This commit is contained in:
@@ -70,6 +70,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
||||
|
||||
private QSCustomizer mCustomizePanel;
|
||||
private Record mDetailRecord;
|
||||
private boolean mTriggeredExpand;
|
||||
|
||||
public QSPanel(Context context) {
|
||||
this(context, null);
|
||||
@@ -384,8 +385,16 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
||||
}
|
||||
|
||||
protected void handleShowDetail(Record r, boolean show) {
|
||||
if (show && !mExpanded) {
|
||||
mHost.animateExpandQS();
|
||||
if (show) {
|
||||
if (!mExpanded) {
|
||||
mTriggeredExpand = true;
|
||||
mHost.animateToggleQSExpansion();
|
||||
} else {
|
||||
mTriggeredExpand = false;
|
||||
}
|
||||
} else if (mTriggeredExpand) {
|
||||
mHost.animateToggleQSExpansion();
|
||||
mTriggeredExpand = false;
|
||||
}
|
||||
if (r instanceof TileRecord) {
|
||||
handleShowDetailTile((TileRecord) r, show);
|
||||
|
||||
@@ -389,7 +389,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
|
||||
void startRunnableDismissingKeyguard(Runnable runnable);
|
||||
void warn(String message, Throwable t);
|
||||
void collapsePanels();
|
||||
void animateExpandQS();
|
||||
void animateToggleQSExpansion();
|
||||
void openPanels();
|
||||
Looper getLooper();
|
||||
Context getContext();
|
||||
|
||||
@@ -209,7 +209,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
|
||||
// already logged
|
||||
}
|
||||
|
||||
public void animateExpandQS() {
|
||||
public void animateToggleQSExpansion() {
|
||||
// TODO: Better path to animated panel expansion.
|
||||
mHeader.performClick();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user