Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +9 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.policy.HeadsUpManager; import java.util.ArrayList; import java.util.Collection; /** * A global state to track all input states for the algorithm. Loading Loading @@ -72,6 +71,7 @@ public class AmbientState { private ExpandableNotificationRow mExpandingNotification; private int mDarkTopPadding; private float mDarkAmount; private boolean mAppearing; public AmbientState(Context context) { reload(context); Loading Loading @@ -436,4 +436,12 @@ public class AmbientState { public int getDarkTopPadding() { return mDarkTopPadding; } public void setAppearing(boolean appearing) { mAppearing = appearing; } public boolean isAppearing() { return mAppearing; } } packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +3 −1 Original line number Diff line number Diff line Loading @@ -885,7 +885,9 @@ public class NotificationStackScrollLayout extends ViewGroup float appearEndPosition = getAppearEndPosition(); float appearStartPosition = getAppearStartPosition(); float appearFraction = 1.0f; if (height >= appearEndPosition) { boolean appearing = height < appearEndPosition; mAmbientState.setAppearing(appearing); if (!appearing) { translationY = 0; if (mShouldShowShelfOnly) { stackHeight = mTopPadding + mShelf.getIntrinsicHeight(); Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +4 −16 Original line number Diff line number Diff line Loading @@ -478,22 +478,6 @@ public class StackScrollAlgorithm { childState.hidden = false; } } // Let's hide all the views if we are not expanded. the views might otherwise be visible // in the headsup area if a view was swiped away if (!mIsExpanded) { for (int i = 0; i < childCount; i++) { boolean visible = false; View child = algorithmState.visibleChildren.get(i); if (child instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) child; visible = row.isHeadsUp() || row.isHeadsUpAnimatingAway(); } if (!visible) { ExpandableViewState childState = resultState.getViewStateForView(child); childState.hidden = true; } } } } private void clampHunToTop(AmbientState ambientState, ExpandableNotificationRow row, Loading Loading @@ -536,6 +520,10 @@ public class StackScrollAlgorithm { int shelfStart = ambientState.getInnerHeight() - ambientState.getShelf().getIntrinsicHeight(); if (ambientState.isAppearing() && !child.isAboveShelf()) { // Don't show none heads-up notifications while in appearing phase. childViewState.yTranslation = Math.max(childViewState.yTranslation, shelfStart); } childViewState.yTranslation = Math.min(childViewState.yTranslation, shelfStart); if (childViewState.yTranslation >= shelfStart) { childViewState.hidden = !child.isExpandAnimationRunning() && !child.hasExpandingChild(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +9 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.policy.HeadsUpManager; import java.util.ArrayList; import java.util.Collection; /** * A global state to track all input states for the algorithm. Loading Loading @@ -72,6 +71,7 @@ public class AmbientState { private ExpandableNotificationRow mExpandingNotification; private int mDarkTopPadding; private float mDarkAmount; private boolean mAppearing; public AmbientState(Context context) { reload(context); Loading Loading @@ -436,4 +436,12 @@ public class AmbientState { public int getDarkTopPadding() { return mDarkTopPadding; } public void setAppearing(boolean appearing) { mAppearing = appearing; } public boolean isAppearing() { return mAppearing; } }
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +3 −1 Original line number Diff line number Diff line Loading @@ -885,7 +885,9 @@ public class NotificationStackScrollLayout extends ViewGroup float appearEndPosition = getAppearEndPosition(); float appearStartPosition = getAppearStartPosition(); float appearFraction = 1.0f; if (height >= appearEndPosition) { boolean appearing = height < appearEndPosition; mAmbientState.setAppearing(appearing); if (!appearing) { translationY = 0; if (mShouldShowShelfOnly) { stackHeight = mTopPadding + mShelf.getIntrinsicHeight(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +4 −16 Original line number Diff line number Diff line Loading @@ -478,22 +478,6 @@ public class StackScrollAlgorithm { childState.hidden = false; } } // Let's hide all the views if we are not expanded. the views might otherwise be visible // in the headsup area if a view was swiped away if (!mIsExpanded) { for (int i = 0; i < childCount; i++) { boolean visible = false; View child = algorithmState.visibleChildren.get(i); if (child instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) child; visible = row.isHeadsUp() || row.isHeadsUpAnimatingAway(); } if (!visible) { ExpandableViewState childState = resultState.getViewStateForView(child); childState.hidden = true; } } } } private void clampHunToTop(AmbientState ambientState, ExpandableNotificationRow row, Loading Loading @@ -536,6 +520,10 @@ public class StackScrollAlgorithm { int shelfStart = ambientState.getInnerHeight() - ambientState.getShelf().getIntrinsicHeight(); if (ambientState.isAppearing() && !child.isAboveShelf()) { // Don't show none heads-up notifications while in appearing phase. childViewState.yTranslation = Math.max(childViewState.yTranslation, shelfStart); } childViewState.yTranslation = Math.min(childViewState.yTranslation, shelfStart); if (childViewState.yTranslation >= shelfStart) { childViewState.hidden = !child.isExpandAnimationRunning() && !child.hasExpandingChild(); Loading