Merge "Fix bug where lockscreen notification is minimized and not dismissable" into sc-dev
This commit is contained in:
@@ -2068,6 +2068,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
int height = 0;
|
int height = 0;
|
||||||
float previousPaddingRequest = mPaddingBetweenElements;
|
float previousPaddingRequest = mPaddingBetweenElements;
|
||||||
int numShownItems = 0;
|
int numShownItems = 0;
|
||||||
|
int numShownNotifs = 0;
|
||||||
boolean finish = false;
|
boolean finish = false;
|
||||||
int maxDisplayedNotifications = mMaxDisplayedNotifications;
|
int maxDisplayedNotifications = mMaxDisplayedNotifications;
|
||||||
ExpandableView previousView = null;
|
ExpandableView previousView = null;
|
||||||
@@ -2077,7 +2078,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
if (expandableView.getVisibility() != View.GONE
|
if (expandableView.getVisibility() != View.GONE
|
||||||
&& !expandableView.hasNoContentHeight() && !footerViewOnLockScreen) {
|
&& !expandableView.hasNoContentHeight() && !footerViewOnLockScreen) {
|
||||||
boolean limitReached = maxDisplayedNotifications != -1
|
boolean limitReached = maxDisplayedNotifications != -1
|
||||||
&& numShownItems >= maxDisplayedNotifications;
|
&& numShownNotifs >= maxDisplayedNotifications;
|
||||||
final float viewHeight;
|
final float viewHeight;
|
||||||
if (limitReached) {
|
if (limitReached) {
|
||||||
viewHeight = mShelf.getIntrinsicHeight();
|
viewHeight = mShelf.getIntrinsicHeight();
|
||||||
@@ -2090,7 +2091,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
}
|
}
|
||||||
height += calculateGapHeight(previousView, expandableView, numShownItems);
|
height += calculateGapHeight(previousView, expandableView, numShownItems);
|
||||||
height += viewHeight;
|
height += viewHeight;
|
||||||
|
|
||||||
numShownItems++;
|
numShownItems++;
|
||||||
|
if (!(expandableView instanceof MediaHeaderView)) {
|
||||||
|
numShownNotifs++;
|
||||||
|
}
|
||||||
previousView = expandableView;
|
previousView = expandableView;
|
||||||
if (finish) {
|
if (finish) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user