Fixed a flicker when expanding quicksettings on the lockscreen

The notifications flickered open when expanding quicksettings
on the lockscreen.

Test: add notifications (>4) expand quicksettings
Bug: 32437839
Change-Id: I12359ec374b281cb11816c7259c78715aedded43
This commit is contained in:
Selim Cinek
2016-11-10 19:59:48 -08:00
parent 5b5beb01dc
commit 91d4cbae0a
2 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ public class AmbientState {
private NotificationShelf mShelf;
private int mZDistanceBetweenElements;
private int mBaseZHeight;
private int mMaxLayoutHeight;
public AmbientState(Context context) {
reload(context);
@@ -185,7 +186,7 @@ public class AmbientState {
}
public int getInnerHeight() {
return Math.max(mLayoutHeight - mTopPadding, mLayoutMinHeight);
return Math.max(Math.min(mLayoutHeight, mMaxLayoutHeight) - mTopPadding, mLayoutMinHeight);
}
public boolean isShadeExpanded() {
@@ -223,4 +224,8 @@ public class AmbientState {
public NotificationShelf getShelf() {
return mShelf;
}
public void setLayoutMaxHeight(int maxLayoutHeight) {
mMaxLayoutHeight = maxLayoutHeight;
}
}

View File

@@ -1926,6 +1926,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
mContentHeight = height + mTopPadding;
updateScrollability();
mAmbientState.setLayoutMaxHeight(mContentHeight);
}
private void updateScrollability() {