Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,11 @@ public class SectionHeaderView extends ActivatableNotificationView { bindContents(); bindContents(); } } @Override public boolean isTransparent() { return true; } /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ void onUiModeChanged() { void onUiModeChanged() { updateBackgroundColors(); updateBackgroundColors(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +6 −9 Original line number Original line Diff line number Diff line Loading @@ -159,15 +159,13 @@ public class StackScrollAlgorithm { float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding() float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding() + ambientState.getStackTranslation() + ambientState.getExpandAnimationTopChange() + ambientState.getStackTranslation() + ambientState.getExpandAnimationTopChange() : 0; : 0; float previousNotificationEnd = 0; float clipStart = 0; float previousNotificationStart = 0; int childCount = algorithmState.visibleChildren.size(); int childCount = algorithmState.visibleChildren.size(); for (int i = 0; i < childCount; i++) { for (int i = 0; i < childCount; i++) { ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableViewState state = child.getViewState(); ExpandableViewState state = child.getViewState(); if (!child.mustStayOnScreen() || state.headsUpIsVisible) { if (!child.mustStayOnScreen() || state.headsUpIsVisible) { previousNotificationEnd = Math.max(drawStart, previousNotificationEnd); clipStart = Math.max(drawStart, clipStart); previousNotificationStart = Math.max(drawStart, previousNotificationStart); } } float newYTranslation = state.yTranslation; float newYTranslation = state.yTranslation; float newHeight = state.height; float newHeight = state.height; Loading @@ -175,10 +173,10 @@ public class StackScrollAlgorithm { boolean isHeadsUp = (child instanceof ExpandableNotificationRow) boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); && ((ExpandableNotificationRow) child).isPinned(); if (mClipNotificationScrollToTop if (mClipNotificationScrollToTop && !state.inShelf && newYTranslation < previousNotificationEnd && (!state.inShelf || isHeadsUp) && (!isHeadsUp || ambientState.isShadeExpanded())) { && newYTranslation < clipStart) { // The previous view is overlapping on top, clip! // The previous view is overlapping on top, clip! float overlapAmount = previousNotificationEnd - newYTranslation; float overlapAmount = clipStart - newYTranslation; state.clipTopAmount = (int) overlapAmount; state.clipTopAmount = (int) overlapAmount; } else { } else { state.clipTopAmount = 0; state.clipTopAmount = 0; Loading @@ -187,8 +185,7 @@ public class StackScrollAlgorithm { if (!child.isTransparent()) { if (!child.isTransparent()) { // Only update the previous values if we are not transparent, // Only update the previous values if we are not transparent, // otherwise we would clip to a transparent view. // otherwise we would clip to a transparent view. previousNotificationEnd = newNotificationEnd; clipStart = Math.max(clipStart, isHeadsUp ? newYTranslation : newNotificationEnd); previousNotificationStart = newYTranslation; } } } } } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/SectionHeaderView.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -83,6 +83,11 @@ public class SectionHeaderView extends ActivatableNotificationView { bindContents(); bindContents(); } } @Override public boolean isTransparent() { return true; } /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ /** Must be called whenever the UI mode changes (i.e. when we enter night mode). */ void onUiModeChanged() { void onUiModeChanged() { updateBackgroundColors(); updateBackgroundColors(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +6 −9 Original line number Original line Diff line number Diff line Loading @@ -159,15 +159,13 @@ public class StackScrollAlgorithm { float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding() float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding() + ambientState.getStackTranslation() + ambientState.getExpandAnimationTopChange() + ambientState.getStackTranslation() + ambientState.getExpandAnimationTopChange() : 0; : 0; float previousNotificationEnd = 0; float clipStart = 0; float previousNotificationStart = 0; int childCount = algorithmState.visibleChildren.size(); int childCount = algorithmState.visibleChildren.size(); for (int i = 0; i < childCount; i++) { for (int i = 0; i < childCount; i++) { ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableView child = algorithmState.visibleChildren.get(i); ExpandableViewState state = child.getViewState(); ExpandableViewState state = child.getViewState(); if (!child.mustStayOnScreen() || state.headsUpIsVisible) { if (!child.mustStayOnScreen() || state.headsUpIsVisible) { previousNotificationEnd = Math.max(drawStart, previousNotificationEnd); clipStart = Math.max(drawStart, clipStart); previousNotificationStart = Math.max(drawStart, previousNotificationStart); } } float newYTranslation = state.yTranslation; float newYTranslation = state.yTranslation; float newHeight = state.height; float newHeight = state.height; Loading @@ -175,10 +173,10 @@ public class StackScrollAlgorithm { boolean isHeadsUp = (child instanceof ExpandableNotificationRow) boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); && ((ExpandableNotificationRow) child).isPinned(); if (mClipNotificationScrollToTop if (mClipNotificationScrollToTop && !state.inShelf && newYTranslation < previousNotificationEnd && (!state.inShelf || isHeadsUp) && (!isHeadsUp || ambientState.isShadeExpanded())) { && newYTranslation < clipStart) { // The previous view is overlapping on top, clip! // The previous view is overlapping on top, clip! float overlapAmount = previousNotificationEnd - newYTranslation; float overlapAmount = clipStart - newYTranslation; state.clipTopAmount = (int) overlapAmount; state.clipTopAmount = (int) overlapAmount; } else { } else { state.clipTopAmount = 0; state.clipTopAmount = 0; Loading @@ -187,8 +185,7 @@ public class StackScrollAlgorithm { if (!child.isTransparent()) { if (!child.isTransparent()) { // Only update the previous values if we are not transparent, // Only update the previous values if we are not transparent, // otherwise we would clip to a transparent view. // otherwise we would clip to a transparent view. previousNotificationEnd = newNotificationEnd; clipStart = Math.max(clipStart, isHeadsUp ? newYTranslation : newNotificationEnd); previousNotificationStart = newYTranslation; } } } } } } Loading