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