VolumeZen: Only display active condition when entering.

Instead of always displaying the active condition, only
show it the first time (when turning zen on).

Bug:15455271
Change-Id: I89e8e2c09fa0d06a5e4c3174f825dfe5a452f06e
This commit is contained in:
John Spurlock
2014-06-05 20:46:01 -04:00
parent 8089ce7cbc
commit 2769ac2907
2 changed files with 3 additions and 10 deletions

View File

@@ -333,6 +333,7 @@ public class VolumePanel extends Handler {
public void onDismiss(DialogInterface dialog) {
mActiveStreamType = -1;
mAudioManager.forceVolumeControlStream(mActiveStreamType);
collapse();
}
});
@@ -651,12 +652,8 @@ public class VolumePanel extends Handler {
mExpandDivider.setVisibility(show ? View.VISIBLE : View.GONE);
mExpandButton.setImageResource(zen ? com.android.systemui.R.drawable.ic_vol_zen_on
: com.android.systemui.R.drawable.ic_vol_zen_off);
if (show) {
if (zen) {
expand();
} else {
collapse();
}
if (show && !zen) {
collapse();
}
} else {
mExpandButton.setVisibility(View.GONE);

View File

@@ -323,10 +323,6 @@ public class ZenModePanel extends LinearLayout {
button1.setVisibility(View.GONE);
button2.setVisibility(View.GONE);
}
if (mExitConditionId != null && mExitConditionId.equals(tag.conditionId)) {
if (DEBUG) Log.d(mTag, "Auto-selecting row with mExitConditionId=" + mExitConditionId);
tag.rb.setChecked(true);
}
}
private void onClickTimeButton(View row, ConditionTag tag, boolean up) {