Loading packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +9 −6 Original line number Diff line number Diff line Loading @@ -66,7 +66,10 @@ public class QuickQSPanel extends QSPanel { private int mMaxTiles; protected QSPanel mFullPanel; private QuickQSMediaPlayer mMediaPlayer; /** Whether or not the QS media player feature is enabled. */ private boolean mUsingMediaPlayer; /** Whether or not the QuickQSPanel currently contains a media player. */ private boolean mHasMediaPlayer; private LinearLayout mHorizontalLinearLayout; // Only used with media Loading Loading @@ -185,8 +188,8 @@ public class QuickQSPanel extends QSPanel { boolean switchTileLayout() { if (!mUsingMediaPlayer) return false; if (mMediaPlayer.hasMediaSession() && mHorizontalLinearLayout.getVisibility() == View.GONE) { mHasMediaPlayer = mMediaPlayer.hasMediaSession(); if (mHasMediaPlayer && mHorizontalLinearLayout.getVisibility() == View.GONE) { mHorizontalLinearLayout.setVisibility(View.VISIBLE); ((View) mRegularTileLayout).setVisibility(View.GONE); mTileLayout.setListening(false); Loading @@ -198,8 +201,7 @@ public class QuickQSPanel extends QSPanel { if (mHost != null) setTiles(mHost.getTiles()); mTileLayout.setListening(mListening); return true; } else if (!mMediaPlayer.hasMediaSession() && mHorizontalLinearLayout.getVisibility() == View.VISIBLE) { } else if (!mHasMediaPlayer && mHorizontalLinearLayout.getVisibility() == View.VISIBLE) { mHorizontalLinearLayout.setVisibility(View.GONE); ((View) mRegularTileLayout).setVisibility(View.VISIBLE); mTileLayout.setListening(false); Loading @@ -215,8 +217,9 @@ public class QuickQSPanel extends QSPanel { return false; } public boolean hasMediaPlayerSession() { return mMediaPlayer.hasMediaSession(); /** Returns true if this panel currently contains a media player. */ public boolean hasMediaPlayer() { return mHasMediaPlayer; } @Override Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +1 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements if (mQsDisabled) { lp.height = resources.getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_offset_height); } else if (useQsMediaPlayer(mContext) && mHeaderQsPanel.hasMediaPlayerSession()) { } else if (useQsMediaPlayer(mContext) && mHeaderQsPanel.hasMediaPlayer()) { lp.height = Math.max(getMinimumHeight(), resources.getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_total_height_with_media)); Loading Loading
packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +9 −6 Original line number Diff line number Diff line Loading @@ -66,7 +66,10 @@ public class QuickQSPanel extends QSPanel { private int mMaxTiles; protected QSPanel mFullPanel; private QuickQSMediaPlayer mMediaPlayer; /** Whether or not the QS media player feature is enabled. */ private boolean mUsingMediaPlayer; /** Whether or not the QuickQSPanel currently contains a media player. */ private boolean mHasMediaPlayer; private LinearLayout mHorizontalLinearLayout; // Only used with media Loading Loading @@ -185,8 +188,8 @@ public class QuickQSPanel extends QSPanel { boolean switchTileLayout() { if (!mUsingMediaPlayer) return false; if (mMediaPlayer.hasMediaSession() && mHorizontalLinearLayout.getVisibility() == View.GONE) { mHasMediaPlayer = mMediaPlayer.hasMediaSession(); if (mHasMediaPlayer && mHorizontalLinearLayout.getVisibility() == View.GONE) { mHorizontalLinearLayout.setVisibility(View.VISIBLE); ((View) mRegularTileLayout).setVisibility(View.GONE); mTileLayout.setListening(false); Loading @@ -198,8 +201,7 @@ public class QuickQSPanel extends QSPanel { if (mHost != null) setTiles(mHost.getTiles()); mTileLayout.setListening(mListening); return true; } else if (!mMediaPlayer.hasMediaSession() && mHorizontalLinearLayout.getVisibility() == View.VISIBLE) { } else if (!mHasMediaPlayer && mHorizontalLinearLayout.getVisibility() == View.VISIBLE) { mHorizontalLinearLayout.setVisibility(View.GONE); ((View) mRegularTileLayout).setVisibility(View.VISIBLE); mTileLayout.setListening(false); Loading @@ -215,8 +217,9 @@ public class QuickQSPanel extends QSPanel { return false; } public boolean hasMediaPlayerSession() { return mMediaPlayer.hasMediaSession(); /** Returns true if this panel currently contains a media player. */ public boolean hasMediaPlayer() { return mHasMediaPlayer; } @Override Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +1 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements if (mQsDisabled) { lp.height = resources.getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_offset_height); } else if (useQsMediaPlayer(mContext) && mHeaderQsPanel.hasMediaPlayerSession()) { } else if (useQsMediaPlayer(mContext) && mHeaderQsPanel.hasMediaPlayer()) { lp.height = Math.max(getMinimumHeight(), resources.getDimensionPixelSize( com.android.internal.R.dimen.quick_qs_total_height_with_media)); Loading