Collapse QS panel after details if we expanded it before

Change-Id: I7de2ec3b304649fbce688ef6d54573cc7c2f4b64
Fixes: 27747650
This commit is contained in:
Jason Monk
2016-04-19 11:38:03 -04:00
parent 28680c61c9
commit 8b54cade4f
3 changed files with 13 additions and 4 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();
}