Merge "Selectively show zen footer." into mnc-dr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
67ea77ec3f
@@ -104,6 +104,7 @@ public class VolumeDialog {
|
|||||||
private final SpTexts mSpTexts;
|
private final SpTexts mSpTexts;
|
||||||
private final SparseBooleanArray mDynamic = new SparseBooleanArray();
|
private final SparseBooleanArray mDynamic = new SparseBooleanArray();
|
||||||
private final KeyguardManager mKeyguard;
|
private final KeyguardManager mKeyguard;
|
||||||
|
private final AudioManager mAudioManager;
|
||||||
private final int mExpandButtonAnimationDuration;
|
private final int mExpandButtonAnimationDuration;
|
||||||
private final ZenFooter mZenFooter;
|
private final ZenFooter mZenFooter;
|
||||||
private final LayoutTransition mLayoutTransition;
|
private final LayoutTransition mLayoutTransition;
|
||||||
@@ -135,6 +136,7 @@ public class VolumeDialog {
|
|||||||
mCallback = callback;
|
mCallback = callback;
|
||||||
mSpTexts = new SpTexts(mContext);
|
mSpTexts = new SpTexts(mContext);
|
||||||
mKeyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
|
mKeyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
|
mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
|
||||||
mDialog = new CustomDialog(mContext);
|
mDialog = new CustomDialog(mContext);
|
||||||
|
|
||||||
@@ -636,7 +638,8 @@ public class VolumeDialog {
|
|||||||
private void updateFooterH() {
|
private void updateFooterH() {
|
||||||
if (D.BUG) Log.d(TAG, "updateFooterH");
|
if (D.BUG) Log.d(TAG, "updateFooterH");
|
||||||
final boolean wasVisible = mZenFooter.getVisibility() == View.VISIBLE;
|
final boolean wasVisible = mZenFooter.getVisibility() == View.VISIBLE;
|
||||||
final boolean visible = mState.zenMode != Global.ZEN_MODE_OFF;
|
final boolean visible = mState.zenMode != Global.ZEN_MODE_OFF
|
||||||
|
&& mAudioManager.isStreamAffectedByRingerMode(mActiveStream);
|
||||||
if (wasVisible != visible && !visible) {
|
if (wasVisible != visible && !visible) {
|
||||||
prepareForCollapse();
|
prepareForCollapse();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user