Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +12 −5 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } }; private OnClickListener mOnClickListener; private boolean mHeadsupDisappearRunning; private View mChildAfterViewWhenDismissed; private View mGroupParentWhenDismissed; private boolean mRefocusOnDismiss; Loading Loading @@ -759,15 +760,17 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mRemoved = true; mPrivateLayout.setRemoved(); if (mChildrenContainer != null) { mChildrenContainer.setRemoved(); } } public NotificationChildrenContainer getChildrenContainer() { return mChildrenContainer; } public void setHeadsupDisappearRunning(boolean running) { mHeadsupDisappearRunning = running; mPrivateLayout.setHeadsupDisappearRunning(running); } public View getChildAfterViewWhenDismissed() { return mChildAfterViewWhenDismissed; } Loading Loading @@ -1173,8 +1176,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { return getMinHeight(); } else if (mIsSummaryWithChildren && !mOnKeyguard) { return mChildrenContainer.getIntrinsicHeight(); } else if (mIsHeadsUp) { if (isPinned()) { } else if (mIsHeadsUp || mHeadsupDisappearRunning) { if (isPinned() || mHeadsupDisappearRunning) { return getPinnedHeadsUpHeight(true /* atLeastMinHeight */); } else if (isExpanded()) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); Loading Loading @@ -1300,6 +1303,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if (!animated) { mPublicLayout.animate().cancel(); mPrivateLayout.animate().cancel(); if (mChildrenContainer != null) { mChildrenContainer.animate().cancel(); mChildrenContainer.setAlpha(1f); } mPublicLayout.setAlpha(1f); mPrivateLayout.setAlpha(1f); mPublicLayout.setVisibility(mShowingPublic ? View.VISIBLE : View.INVISIBLE); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +9 −2 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public class NotificationContentView extends FrameLayout { private int mContentHeightAtAnimationStart = UNDEFINED; private boolean mFocusOnVisibilityChange; private boolean mHeadsupDisappearRunning; public NotificationContentView(Context context, AttributeSet attrs) { Loading Loading @@ -446,7 +447,8 @@ public class NotificationContentView extends FrameLayout { boolean transitioningBetweenHunAndExpanded = isTransitioningFromTo(VISIBLE_TYPE_HEADSUP, VISIBLE_TYPE_EXPANDED) || isTransitioningFromTo(VISIBLE_TYPE_EXPANDED, VISIBLE_TYPE_HEADSUP); boolean pinned = !isVisibleOrTransitioning(VISIBLE_TYPE_CONTRACTED) && mIsHeadsUp; boolean pinned = !isVisibleOrTransitioning(VISIBLE_TYPE_CONTRACTED) && (mIsHeadsUp || mHeadsupDisappearRunning); if (transitioningBetweenHunAndExpanded || pinned) { return Math.min(mHeadsUpChild.getHeight(), mExpandedChild.getHeight()); } Loading Loading @@ -830,7 +832,7 @@ public class NotificationContentView extends FrameLayout { return VISIBLE_TYPE_SINGLELINE; } if (mIsHeadsUp && mHeadsUpChild != null) { if ((mIsHeadsUp || mHeadsupDisappearRunning) && mHeadsUpChild != null) { if (viewHeight <= mHeadsUpChild.getHeight() || noExpandedChild) { return VISIBLE_TYPE_HEADSUP; } else { Loading Loading @@ -1153,6 +1155,11 @@ public class NotificationContentView extends FrameLayout { } } public void setHeadsupDisappearRunning(boolean headsupDisappearRunning) { mHeadsupDisappearRunning = headsupDisappearRunning; selectLayout(false /* animate */, true /* force */); } public void setFocusOnVisibilityChange() { mFocusOnVisibilityChange = true; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -213,18 +213,18 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged return isGroupSuppressed(getGroupKey(sbn)) && sbn.getNotification().isGroupSummary(); } public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn) { return isGroupSuppressed(sbn.getGroupKey()) && isOnlyChild(sbn); } private boolean isOnlyChild(StatusBarNotification sbn) { return !sbn.getNotification().isGroupSummary() && getTotalNumberOfChildren(sbn) == 1; } public boolean isOnlyChildInGroup(StatusBarNotification sbn) { return isOnlyChild(sbn) && getLogicalGroupSummary(sbn) != null; if (!isOnlyChild(sbn)) { return false; } ExpandableNotificationRow logicalGroupSummary = getLogicalGroupSummary(sbn); return logicalGroupSummary != null && !logicalGroupSummary.getStatusBarNotification().equals(sbn); } private int getTotalNumberOfChildren(StatusBarNotification sbn) { Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +0 −8 Original line number Diff line number Diff line Loading @@ -856,14 +856,6 @@ public class NotificationChildrenContainer extends ViewGroup { mNotificationParent.getNotificationColor()); } public void setRemoved() { int childCount = mChildren.size(); for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); child.setRemoved(); } } public int getPositionInLinearLayout(View childInGroup) { int position = mNotificationHeaderMargin + mNotificatonTopPadding; Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +3 −0 Original line number Diff line number Diff line Loading @@ -3689,6 +3689,9 @@ public class NotificationStackScrollLayout extends ViewGroup if (mAnimationsEnabled) { mHeadsUpChangeAnimations.add(new Pair<>(row, isHeadsUp)); mNeedsAnimation = true; if (!mIsExpanded && !isHeadsUp) { row.setHeadsupDisappearRunning(true); } requestChildrenUpdate(); } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +12 −5 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } }; private OnClickListener mOnClickListener; private boolean mHeadsupDisappearRunning; private View mChildAfterViewWhenDismissed; private View mGroupParentWhenDismissed; private boolean mRefocusOnDismiss; Loading Loading @@ -759,15 +760,17 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mRemoved = true; mPrivateLayout.setRemoved(); if (mChildrenContainer != null) { mChildrenContainer.setRemoved(); } } public NotificationChildrenContainer getChildrenContainer() { return mChildrenContainer; } public void setHeadsupDisappearRunning(boolean running) { mHeadsupDisappearRunning = running; mPrivateLayout.setHeadsupDisappearRunning(running); } public View getChildAfterViewWhenDismissed() { return mChildAfterViewWhenDismissed; } Loading Loading @@ -1173,8 +1176,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { return getMinHeight(); } else if (mIsSummaryWithChildren && !mOnKeyguard) { return mChildrenContainer.getIntrinsicHeight(); } else if (mIsHeadsUp) { if (isPinned()) { } else if (mIsHeadsUp || mHeadsupDisappearRunning) { if (isPinned() || mHeadsupDisappearRunning) { return getPinnedHeadsUpHeight(true /* atLeastMinHeight */); } else if (isExpanded()) { return Math.max(getMaxExpandHeight(), mHeadsUpHeight); Loading Loading @@ -1300,6 +1303,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if (!animated) { mPublicLayout.animate().cancel(); mPrivateLayout.animate().cancel(); if (mChildrenContainer != null) { mChildrenContainer.animate().cancel(); mChildrenContainer.setAlpha(1f); } mPublicLayout.setAlpha(1f); mPrivateLayout.setAlpha(1f); mPublicLayout.setVisibility(mShowingPublic ? View.VISIBLE : View.INVISIBLE); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +9 −2 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public class NotificationContentView extends FrameLayout { private int mContentHeightAtAnimationStart = UNDEFINED; private boolean mFocusOnVisibilityChange; private boolean mHeadsupDisappearRunning; public NotificationContentView(Context context, AttributeSet attrs) { Loading Loading @@ -446,7 +447,8 @@ public class NotificationContentView extends FrameLayout { boolean transitioningBetweenHunAndExpanded = isTransitioningFromTo(VISIBLE_TYPE_HEADSUP, VISIBLE_TYPE_EXPANDED) || isTransitioningFromTo(VISIBLE_TYPE_EXPANDED, VISIBLE_TYPE_HEADSUP); boolean pinned = !isVisibleOrTransitioning(VISIBLE_TYPE_CONTRACTED) && mIsHeadsUp; boolean pinned = !isVisibleOrTransitioning(VISIBLE_TYPE_CONTRACTED) && (mIsHeadsUp || mHeadsupDisappearRunning); if (transitioningBetweenHunAndExpanded || pinned) { return Math.min(mHeadsUpChild.getHeight(), mExpandedChild.getHeight()); } Loading Loading @@ -830,7 +832,7 @@ public class NotificationContentView extends FrameLayout { return VISIBLE_TYPE_SINGLELINE; } if (mIsHeadsUp && mHeadsUpChild != null) { if ((mIsHeadsUp || mHeadsupDisappearRunning) && mHeadsUpChild != null) { if (viewHeight <= mHeadsUpChild.getHeight() || noExpandedChild) { return VISIBLE_TYPE_HEADSUP; } else { Loading Loading @@ -1153,6 +1155,11 @@ public class NotificationContentView extends FrameLayout { } } public void setHeadsupDisappearRunning(boolean headsupDisappearRunning) { mHeadsupDisappearRunning = headsupDisappearRunning; selectLayout(false /* animate */, true /* force */); } public void setFocusOnVisibilityChange() { mFocusOnVisibilityChange = true; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -213,18 +213,18 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged return isGroupSuppressed(getGroupKey(sbn)) && sbn.getNotification().isGroupSummary(); } public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn) { return isGroupSuppressed(sbn.getGroupKey()) && isOnlyChild(sbn); } private boolean isOnlyChild(StatusBarNotification sbn) { return !sbn.getNotification().isGroupSummary() && getTotalNumberOfChildren(sbn) == 1; } public boolean isOnlyChildInGroup(StatusBarNotification sbn) { return isOnlyChild(sbn) && getLogicalGroupSummary(sbn) != null; if (!isOnlyChild(sbn)) { return false; } ExpandableNotificationRow logicalGroupSummary = getLogicalGroupSummary(sbn); return logicalGroupSummary != null && !logicalGroupSummary.getStatusBarNotification().equals(sbn); } private int getTotalNumberOfChildren(StatusBarNotification sbn) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +0 −8 Original line number Diff line number Diff line Loading @@ -856,14 +856,6 @@ public class NotificationChildrenContainer extends ViewGroup { mNotificationParent.getNotificationColor()); } public void setRemoved() { int childCount = mChildren.size(); for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); child.setRemoved(); } } public int getPositionInLinearLayout(View childInGroup) { int position = mNotificationHeaderMargin + mNotificatonTopPadding; Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +3 −0 Original line number Diff line number Diff line Loading @@ -3689,6 +3689,9 @@ public class NotificationStackScrollLayout extends ViewGroup if (mAnimationsEnabled) { mHeadsUpChangeAnimations.add(new Pair<>(row, isHeadsUp)); mNeedsAnimation = true; if (!mIsExpanded && !isHeadsUp) { row.setHeadsupDisappearRunning(true); } requestChildrenUpdate(); } } Loading