Loading packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ android:clipChildren="false" android:clipToPadding="false" android:focusable="true" android:paddingBottom="10dp" android:paddingBottom="24dp" android:importantForAccessibility="yes" /> </RelativeLayout> Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +16 −3 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ public class QSPanel extends LinearLayout implements Tunable { private static final String TAG = "QSPanel"; protected final Context mContext; private final int mMediaTopMargin; private final int mMediaTotalBottomMargin; /** * The index where the content starts that needs to be moved between parents Loading Loading @@ -98,13 +100,14 @@ public class QSPanel extends LinearLayout implements Tunable { protected LinearLayout mHorizontalContentContainer; protected QSTileLayout mTileLayout; private int mMediaTotalBottomMargin; public QSPanel(Context context, AttributeSet attrs) { super(context, attrs); mUsingMediaPlayer = useQsMediaPlayer(context); mMediaTotalBottomMargin = getResources().getDimensionPixelSize( R.dimen.quick_settings_bottom_margin_media); mMediaTopMargin = getResources().getDimensionPixelSize( R.dimen.qs_tile_margin_vertical); mContext = context; setOrientation(VERTICAL); Loading Loading @@ -326,7 +329,7 @@ public class QSPanel extends LinearLayout implements Tunable { private void updateHorizontalLinearLayoutMargins() { if (mHorizontalLinearLayout != null && !displayMediaMarginsOnMedia()) { LayoutParams lp = (LayoutParams) mHorizontalLinearLayout.getLayoutParams(); lp.bottomMargin = mMediaTotalBottomMargin - getPaddingBottom(); lp.bottomMargin = Math.max(mMediaTotalBottomMargin - getPaddingBottom(), 0); mHorizontalLinearLayout.setLayoutParams(lp); } } Loading @@ -341,6 +344,13 @@ public class QSPanel extends LinearLayout implements Tunable { return true; } /** * @return true if the media view needs margin on the top to separate it from the qs tiles */ protected boolean mediaNeedsTopMargin() { return false; } private boolean needsDynamicRowsAndColumns() { return true; } Loading Loading @@ -405,7 +415,9 @@ public class QSPanel extends LinearLayout implements Tunable { // necessary if the view isn't horizontal, since otherwise the padding is // carried in the parent of this view (to ensure correct vertical alignment) layoutParams.bottomMargin = !horizontal || displayMediaMarginsOnMedia() ? mMediaTotalBottomMargin - getPaddingBottom() : 0; ? Math.max(mMediaTotalBottomMargin - getPaddingBottom(), 0) : 0; layoutParams.topMargin = mediaNeedsTopMargin() && !horizontal ? mMediaTopMargin : 0; } } Loading Loading @@ -673,6 +685,7 @@ public class QSPanel extends LinearLayout implements Tunable { mTileLayout.setMaxColumns(horizontal ? 2 : 4); } updateMargins(mediaHostView); mHorizontalLinearLayout.setVisibility(horizontal ? View.VISIBLE : View.GONE); } } Loading packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +5 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,11 @@ public class QuickQSPanel extends QSPanel { return false; } @Override protected boolean mediaNeedsTopMargin() { return true; } @Override protected void updatePadding() { // QS Panel is setting a top padding by default, which we don't need. Loading Loading @@ -174,7 +179,6 @@ public class QuickQSPanel extends QSPanel { LayoutParams.WRAP_CONTENT); setLayoutParams(lp); setMaxColumns(4); mLastRowPadding = true; } @Override Loading packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +1 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ public class TileLayout extends ViewGroup implements QSTileLayout { protected int mCellMarginVertical; protected int mSidePadding; protected int mRows = 1; protected boolean mLastRowPadding = false; protected final ArrayList<TileRecord> mRecords = new ArrayList<>(); protected boolean mListening; Loading Loading @@ -168,9 +167,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout { } int height = (mCellHeight + mCellMarginVertical) * mRows; if (!mLastRowPadding) { height -= mCellMarginVertical; } if (height < 0) height = 0; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +8 −3 Original line number Diff line number Diff line Loading @@ -274,7 +274,9 @@ public class StackScrollAlgorithm { // expanded. Consider updating these states in updateContentView instead so that we don't // have to recalculate in every frame. float currentY = -ambientState.getScrollY(); if (!ambientState.isOnKeyguard()) { if (!ambientState.isOnKeyguard() || (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) { // add top padding at the start as long as we're not on the lock screen currentY += mNotificationScrimPadding; } state.firstViewInShelf = null; Loading Loading @@ -324,7 +326,8 @@ public class StackScrollAlgorithm { */ private void updatePositionsForState(StackScrollAlgorithmState algorithmState, AmbientState ambientState) { if (!ambientState.isOnKeyguard()) { if (!ambientState.isOnKeyguard() || (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) { algorithmState.mCurrentYPosition += mNotificationScrimPadding; algorithmState.mCurrentExpandedYPosition += mNotificationScrimPadding; } Loading Loading @@ -355,7 +358,9 @@ public class StackScrollAlgorithm { && algorithmState.firstViewInShelf != null; final float shelfHeight = showingShelf ? ambientState.getShelf().getIntrinsicHeight() : 0f; final float scrimPadding = ambientState.isOnKeyguard() ? 0 : mNotificationScrimPadding; final float scrimPadding = ambientState.isOnKeyguard() && (!ambientState.isBypassEnabled() || !ambientState.isPulseExpanding()) ? 0 : mNotificationScrimPadding; final float stackHeight = ambientState.getStackHeight() - shelfHeight - scrimPadding; final float stackEndHeight = ambientState.getStackEndHeight() - shelfHeight - scrimPadding; Loading Loading
packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ android:clipChildren="false" android:clipToPadding="false" android:focusable="true" android:paddingBottom="10dp" android:paddingBottom="24dp" android:importantForAccessibility="yes" /> </RelativeLayout> Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +16 −3 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ public class QSPanel extends LinearLayout implements Tunable { private static final String TAG = "QSPanel"; protected final Context mContext; private final int mMediaTopMargin; private final int mMediaTotalBottomMargin; /** * The index where the content starts that needs to be moved between parents Loading Loading @@ -98,13 +100,14 @@ public class QSPanel extends LinearLayout implements Tunable { protected LinearLayout mHorizontalContentContainer; protected QSTileLayout mTileLayout; private int mMediaTotalBottomMargin; public QSPanel(Context context, AttributeSet attrs) { super(context, attrs); mUsingMediaPlayer = useQsMediaPlayer(context); mMediaTotalBottomMargin = getResources().getDimensionPixelSize( R.dimen.quick_settings_bottom_margin_media); mMediaTopMargin = getResources().getDimensionPixelSize( R.dimen.qs_tile_margin_vertical); mContext = context; setOrientation(VERTICAL); Loading Loading @@ -326,7 +329,7 @@ public class QSPanel extends LinearLayout implements Tunable { private void updateHorizontalLinearLayoutMargins() { if (mHorizontalLinearLayout != null && !displayMediaMarginsOnMedia()) { LayoutParams lp = (LayoutParams) mHorizontalLinearLayout.getLayoutParams(); lp.bottomMargin = mMediaTotalBottomMargin - getPaddingBottom(); lp.bottomMargin = Math.max(mMediaTotalBottomMargin - getPaddingBottom(), 0); mHorizontalLinearLayout.setLayoutParams(lp); } } Loading @@ -341,6 +344,13 @@ public class QSPanel extends LinearLayout implements Tunable { return true; } /** * @return true if the media view needs margin on the top to separate it from the qs tiles */ protected boolean mediaNeedsTopMargin() { return false; } private boolean needsDynamicRowsAndColumns() { return true; } Loading Loading @@ -405,7 +415,9 @@ public class QSPanel extends LinearLayout implements Tunable { // necessary if the view isn't horizontal, since otherwise the padding is // carried in the parent of this view (to ensure correct vertical alignment) layoutParams.bottomMargin = !horizontal || displayMediaMarginsOnMedia() ? mMediaTotalBottomMargin - getPaddingBottom() : 0; ? Math.max(mMediaTotalBottomMargin - getPaddingBottom(), 0) : 0; layoutParams.topMargin = mediaNeedsTopMargin() && !horizontal ? mMediaTopMargin : 0; } } Loading Loading @@ -673,6 +685,7 @@ public class QSPanel extends LinearLayout implements Tunable { mTileLayout.setMaxColumns(horizontal ? 2 : 4); } updateMargins(mediaHostView); mHorizontalLinearLayout.setVisibility(horizontal ? View.VISIBLE : View.GONE); } } Loading
packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +5 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,11 @@ public class QuickQSPanel extends QSPanel { return false; } @Override protected boolean mediaNeedsTopMargin() { return true; } @Override protected void updatePadding() { // QS Panel is setting a top padding by default, which we don't need. Loading Loading @@ -174,7 +179,6 @@ public class QuickQSPanel extends QSPanel { LayoutParams.WRAP_CONTENT); setLayoutParams(lp); setMaxColumns(4); mLastRowPadding = true; } @Override Loading
packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +1 −4 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ public class TileLayout extends ViewGroup implements QSTileLayout { protected int mCellMarginVertical; protected int mSidePadding; protected int mRows = 1; protected boolean mLastRowPadding = false; protected final ArrayList<TileRecord> mRecords = new ArrayList<>(); protected boolean mListening; Loading Loading @@ -168,9 +167,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout { } int height = (mCellHeight + mCellMarginVertical) * mRows; if (!mLastRowPadding) { height -= mCellMarginVertical; } if (height < 0) height = 0; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +8 −3 Original line number Diff line number Diff line Loading @@ -274,7 +274,9 @@ public class StackScrollAlgorithm { // expanded. Consider updating these states in updateContentView instead so that we don't // have to recalculate in every frame. float currentY = -ambientState.getScrollY(); if (!ambientState.isOnKeyguard()) { if (!ambientState.isOnKeyguard() || (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) { // add top padding at the start as long as we're not on the lock screen currentY += mNotificationScrimPadding; } state.firstViewInShelf = null; Loading Loading @@ -324,7 +326,8 @@ public class StackScrollAlgorithm { */ private void updatePositionsForState(StackScrollAlgorithmState algorithmState, AmbientState ambientState) { if (!ambientState.isOnKeyguard()) { if (!ambientState.isOnKeyguard() || (ambientState.isBypassEnabled() && ambientState.isPulseExpanding())) { algorithmState.mCurrentYPosition += mNotificationScrimPadding; algorithmState.mCurrentExpandedYPosition += mNotificationScrimPadding; } Loading Loading @@ -355,7 +358,9 @@ public class StackScrollAlgorithm { && algorithmState.firstViewInShelf != null; final float shelfHeight = showingShelf ? ambientState.getShelf().getIntrinsicHeight() : 0f; final float scrimPadding = ambientState.isOnKeyguard() ? 0 : mNotificationScrimPadding; final float scrimPadding = ambientState.isOnKeyguard() && (!ambientState.isBypassEnabled() || !ambientState.isPulseExpanding()) ? 0 : mNotificationScrimPadding; final float stackHeight = ambientState.getStackHeight() - shelfHeight - scrimPadding; final float stackEndHeight = ambientState.getStackEndHeight() - shelfHeight - scrimPadding; Loading