Fixed the lockscreen positon with a single notificaton

The notification was wrongly pushed up on the lockscreen
if there was only a single notification.

Test: Add a single notification, observe that it's not pushed in.
Bug: 32437839
Change-Id: Ica6275d0efb18a0a39d943e874d464a86593d5b3
This commit is contained in:
Selim Cinek
2016-10-27 18:17:08 -07:00
parent cafa87f91d
commit aa417dac58

View File

@@ -769,11 +769,17 @@ public class NotificationStackScrollLayout extends ViewGroup
* Measured in absolute height.
*/
private float getAppearEndPosition() {
int firstItemHeight = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()
? mHeadsUpManager.getTopHeadsUpPinnedHeight() + mBottomStackPeekSize
+ mBottomStackSlowDownHeight
: getFirstItemMinHeight() + mShelf.getIntrinsicHeight();
return firstItemHeight + (onKeyguard() ? mTopPadding : mIntrinsicPadding);
int appearPosition;
if (mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()) {
appearPosition = mHeadsUpManager.getTopHeadsUpPinnedHeight() + mBottomStackPeekSize
+ mBottomStackSlowDownHeight;
} else {
appearPosition = getFirstItemMinHeight();
if (mAmbientState.getShelfIndex() > 1) {
appearPosition += mShelf.getIntrinsicHeight();
}
}
return appearPosition + (onKeyguard() ? mTopPadding : mIntrinsicPadding);
}
/**