Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardHostView.OnDismissAction; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.DejankUtils; import com.android.systemui.Interpolators; import com.android.systemui.R; Loading Loading @@ -2193,7 +2193,7 @@ public abstract class BaseStatusBar extends SystemUI implements } else { boolean wasGone = entry.row.getVisibility() == View.GONE; entry.row.setVisibility(View.VISIBLE); if (!childNotification) { if (!childNotification && !entry.row.isRemoved()) { if (wasGone) { // notify the scroller of a child addition mStackScroller.generateAddAnimation(entry.row, Loading @@ -2213,7 +2213,7 @@ public abstract class BaseStatusBar extends SystemUI implements mStackScroller.getChildCount() - 3); } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { public boolean shouldShowOnKeyguard(StatusBarNotification sbn) { return mShowLockscreenNotifications && !mNotificationData.isAmbient(sbn.getKey()); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +8 −1 Original line number Diff line number Diff line Loading @@ -418,11 +418,18 @@ public class NotificationPanelView extends PanelView implements if (!(child instanceof ExpandableNotificationRow)) { continue; } ExpandableNotificationRow row = (ExpandableNotificationRow) child; boolean suppressedSummary = mGroupManager.isSummaryOfSuppressedGroup( ((ExpandableNotificationRow) child).getStatusBarNotification()); row.getStatusBarNotification()); if (suppressedSummary) { continue; } if (!mStatusBar.shouldShowOnKeyguard(row.getStatusBarNotification())) { continue; } if (row.isRemoved()) { continue; } availableSpace -= child.getMinHeight() + notificationPadding; if (availableSpace >= 0 && count < maximum) { count++; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, ArrayList<ExpandableNotificationRow> toRemove = new ArrayList<>(notificationChildren); for (int i = 0; i < toRemove.size(); i++) { toRemove.get(i).setKeepInParent(true); toRemove.get(i).setRemoved(true); } for (int i = 0; i < toRemove.size(); i++) { removeNotification(toRemove.get(i).getStatusBarNotification().getKey(), ranking); Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +7 −6 Original line number Diff line number Diff line Loading @@ -103,9 +103,8 @@ public class NotificationChildrenContainer extends ViewGroup { int childCount = Math.min(mChildren.size(), NUMBER_OF_CHILDREN_WHEN_CHILDREN_EXPANDED); for (int i = 0; i < childCount; i++) { View child = mChildren.get(i); if (child.getVisibility() == View.GONE) { continue; } // We need to layout all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen child.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight()); mDividers.get(i).layout(0, 0, getWidth(), mDividerHeight); } Loading Loading @@ -138,17 +137,19 @@ public class NotificationChildrenContainer extends ViewGroup { int overflowIndex = childCount > collapsedChildren ? collapsedChildren - 1 : -1; for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); // We need to measure all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen. boolean isOverflow = i == overflowIndex; child.setSingleLineWidthIndention(isOverflow && mOverflowNumber != null ? mOverflowNumber.getMeasuredWidth() : 0); child.measure(widthMeasureSpec, newHeightSpec); height += child.getMeasuredHeight(); // layout the divider View divider = mDividers.get(i); divider.measure(widthMeasureSpec, dividerHeightSpec); height += mDividerHeight; if (child.getVisibility() != GONE) { height += child.getMeasuredHeight() + mDividerHeight; } } mRealHeight = height; if (heightMode != MeasureSpec.UNSPECIFIED) { Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +8 −5 Original line number Diff line number Diff line Loading @@ -483,19 +483,22 @@ public class NotificationStackScrollLayout extends ViewGroup @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); measureChildren(widthMeasureSpec, heightMeasureSpec); // We need to measure all children even the GONE ones, such that the heights are calculated // correctly as they are used to calculate how many we can fit on the screen. final int size = getChildCount(); for (int i = 0; i < size; i++) { measureChild(getChildAt(i), widthMeasureSpec, heightMeasureSpec); } } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { // we layout all our children centered on the top float centerX = getWidth() / 2.0f; for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } // We need to layout all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen float width = child.getMeasuredWidth(); float height = child.getMeasuredHeight(); child.layout((int) (centerX - width / 2.0f), Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardHostView.OnDismissAction; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.DejankUtils; import com.android.systemui.Interpolators; import com.android.systemui.R; Loading Loading @@ -2193,7 +2193,7 @@ public abstract class BaseStatusBar extends SystemUI implements } else { boolean wasGone = entry.row.getVisibility() == View.GONE; entry.row.setVisibility(View.VISIBLE); if (!childNotification) { if (!childNotification && !entry.row.isRemoved()) { if (wasGone) { // notify the scroller of a child addition mStackScroller.generateAddAnimation(entry.row, Loading @@ -2213,7 +2213,7 @@ public abstract class BaseStatusBar extends SystemUI implements mStackScroller.getChildCount() - 3); } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { public boolean shouldShowOnKeyguard(StatusBarNotification sbn) { return mShowLockscreenNotifications && !mNotificationData.isAmbient(sbn.getKey()); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +8 −1 Original line number Diff line number Diff line Loading @@ -418,11 +418,18 @@ public class NotificationPanelView extends PanelView implements if (!(child instanceof ExpandableNotificationRow)) { continue; } ExpandableNotificationRow row = (ExpandableNotificationRow) child; boolean suppressedSummary = mGroupManager.isSummaryOfSuppressedGroup( ((ExpandableNotificationRow) child).getStatusBarNotification()); row.getStatusBarNotification()); if (suppressedSummary) { continue; } if (!mStatusBar.shouldShowOnKeyguard(row.getStatusBarNotification())) { continue; } if (row.isRemoved()) { continue; } availableSpace -= child.getMinHeight() + notificationPadding; if (availableSpace >= 0 && count < maximum) { count++; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1550,6 +1550,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, ArrayList<ExpandableNotificationRow> toRemove = new ArrayList<>(notificationChildren); for (int i = 0; i < toRemove.size(); i++) { toRemove.get(i).setKeepInParent(true); toRemove.get(i).setRemoved(true); } for (int i = 0; i < toRemove.size(); i++) { removeNotification(toRemove.get(i).getStatusBarNotification().getKey(), ranking); Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +7 −6 Original line number Diff line number Diff line Loading @@ -103,9 +103,8 @@ public class NotificationChildrenContainer extends ViewGroup { int childCount = Math.min(mChildren.size(), NUMBER_OF_CHILDREN_WHEN_CHILDREN_EXPANDED); for (int i = 0; i < childCount; i++) { View child = mChildren.get(i); if (child.getVisibility() == View.GONE) { continue; } // We need to layout all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen child.layout(0, 0, child.getMeasuredWidth(), child.getMeasuredHeight()); mDividers.get(i).layout(0, 0, getWidth(), mDividerHeight); } Loading Loading @@ -138,17 +137,19 @@ public class NotificationChildrenContainer extends ViewGroup { int overflowIndex = childCount > collapsedChildren ? collapsedChildren - 1 : -1; for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); // We need to measure all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen. boolean isOverflow = i == overflowIndex; child.setSingleLineWidthIndention(isOverflow && mOverflowNumber != null ? mOverflowNumber.getMeasuredWidth() : 0); child.measure(widthMeasureSpec, newHeightSpec); height += child.getMeasuredHeight(); // layout the divider View divider = mDividers.get(i); divider.measure(widthMeasureSpec, dividerHeightSpec); height += mDividerHeight; if (child.getVisibility() != GONE) { height += child.getMeasuredHeight() + mDividerHeight; } } mRealHeight = height; if (heightMode != MeasureSpec.UNSPECIFIED) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +8 −5 Original line number Diff line number Diff line Loading @@ -483,19 +483,22 @@ public class NotificationStackScrollLayout extends ViewGroup @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); measureChildren(widthMeasureSpec, heightMeasureSpec); // We need to measure all children even the GONE ones, such that the heights are calculated // correctly as they are used to calculate how many we can fit on the screen. final int size = getChildCount(); for (int i = 0; i < size; i++) { measureChild(getChildAt(i), widthMeasureSpec, heightMeasureSpec); } } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { // we layout all our children centered on the top float centerX = getWidth() / 2.0f; for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } // We need to layout all children even the GONE ones, such that the heights are // calculated correctly as they are used to calculate how many we can fit on the screen float width = child.getMeasuredWidth(); float height = child.getMeasuredHeight(); child.layout((int) (centerX - width / 2.0f), Loading