Fixed an issue where the background could show in a wrong way
am: d381bc3133
Change-Id: I219e4809a6a9f839353e049d4d563ece37866ca2
This commit is contained in:
@@ -412,7 +412,10 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDraw(Canvas canvas) {
|
protected void onDraw(Canvas canvas) {
|
||||||
canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom, mBackgroundPaint);
|
if (mCurrentBounds.top < mCurrentBounds.bottom) {
|
||||||
|
canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom,
|
||||||
|
mBackgroundPaint);
|
||||||
|
}
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
int y = mTopPadding;
|
int y = mTopPadding;
|
||||||
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
||||||
@@ -2013,11 +2016,12 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
bottom = top;
|
bottom = top;
|
||||||
}
|
}
|
||||||
if (mPhoneStatusBar.getBarState() != StatusBarState.KEYGUARD) {
|
if (mPhoneStatusBar.getBarState() != StatusBarState.KEYGUARD) {
|
||||||
mBackgroundBounds.top = (int) Math.max(mTopPadding + mStackTranslation, top);
|
top = (int) Math.max(mTopPadding + mStackTranslation, top);
|
||||||
} else {
|
} else {
|
||||||
// otherwise the animation from the shade to the keyguard will jump as it's maxed
|
// otherwise the animation from the shade to the keyguard will jump as it's maxed
|
||||||
mBackgroundBounds.top = Math.max(0, top);
|
top = Math.max(0, top);
|
||||||
}
|
}
|
||||||
|
mBackgroundBounds.top = top;
|
||||||
mBackgroundBounds.bottom = Math.min(getHeight(), Math.max(bottom, top));
|
mBackgroundBounds.bottom = Math.min(getHeight(), Math.max(bottom, top));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user