Loading packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,9 @@ <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <!-- max height of a notification such that the content can still fade out when closing --> <dimen name="max_notification_fadeout_height">100dp</dimen> <!-- Height of a small notification in the status bar--> <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">92dp</dimen> <dimen name="notification_min_height">92dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class NotificationPanelView extends PanelView implements private boolean mExpandingFromHeadsUp; private boolean mExpandingFromHeadsUp; private boolean mCollapsedOnDown; private boolean mCollapsedOnDown; private int mPositionMinSideMargin; private int mPositionMinSideMargin; private int mMaxFadeoutHeight; private int mLastOrientation = -1; private int mLastOrientation = -1; private boolean mClosingWithAlphaFadeOut; private boolean mClosingWithAlphaFadeOut; private boolean mHeadsUpAnimatingAway; private boolean mHeadsUpAnimatingAway; Loading Loading @@ -278,6 +279,8 @@ public class NotificationPanelView extends PanelView implements R.dimen.qs_falsing_threshold); R.dimen.qs_falsing_threshold); mPositionMinSideMargin = getResources().getDimensionPixelSize( mPositionMinSideMargin = getResources().getDimensionPixelSize( R.dimen.notification_panel_min_side_margin); R.dimen.notification_panel_min_side_margin); mMaxFadeoutHeight = getResources().getDimensionPixelSize( R.dimen.max_notification_fadeout_height); } } public void updateResources() { public void updateResources() { Loading Loading @@ -552,7 +555,9 @@ public class NotificationPanelView extends PanelView implements protected void flingToHeight(float vel, boolean expand, float target, protected void flingToHeight(float vel, boolean expand, float target, float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { mHeadsUpTouchHelper.notifyFling(!expand); mHeadsUpTouchHelper.notifyFling(!expand); setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f); setClosingWithAlphaFadeout(!expand && mNotificationStackScroller.getFirstChildIntrinsicHeight() <= mMaxFadeoutHeight && getFadeoutAlpha() == 1.0f); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class NotificationStackScrollLayout extends ViewGroup */ */ private float getExpandTranslationStart() { private float getExpandTranslationStart() { int startPosition = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp() int startPosition = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp() ? 0 : -getFirstChildMinHeight(); ? 0 : -getFirstChildIntrinsicHeight(); return startPosition - mTopPadding; return startPosition - mTopPadding; } } Loading Loading @@ -2140,17 +2140,17 @@ public class NotificationStackScrollLayout extends ViewGroup } } public int getLayoutMinHeight() { public int getLayoutMinHeight() { int firstChildMinHeight = getFirstChildMinHeight(); int firstChildMinHeight = getFirstChildIntrinsicHeight(); return Math.min(firstChildMinHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight, return Math.min(firstChildMinHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight, mMaxLayoutHeight - mTopPadding); mMaxLayoutHeight - mTopPadding); } } private int getFirstChildMinHeight() { public int getFirstChildIntrinsicHeight() { final ExpandableView firstChild = getFirstChildNotGone(); final ExpandableView firstChild = getFirstChildNotGone(); int firstChildMinHeight = firstChild != null int firstChildMinHeight = firstChild != null ? firstChild.getIntrinsicHeight() ? firstChild.getIntrinsicHeight() : mEmptyShadeView != null : mEmptyShadeView != null ? mEmptyShadeView.getMinHeight() ? mEmptyShadeView.getIntrinsicHeight() : mCollapsedSize; : mCollapsedSize; if (mOwnScrollY > 0) { if (mOwnScrollY > 0) { firstChildMinHeight = Math.max(firstChildMinHeight - mOwnScrollY, mCollapsedSize); firstChildMinHeight = Math.max(firstChildMinHeight - mOwnScrollY, mCollapsedSize); Loading Loading
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,9 @@ <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <!-- The amount to scale each of the status bar icons by. A value of 1 means no scaling. --> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.0</item> <!-- max height of a notification such that the content can still fade out when closing --> <dimen name="max_notification_fadeout_height">100dp</dimen> <!-- Height of a small notification in the status bar--> <!-- Height of a small notification in the status bar--> <dimen name="notification_min_height">92dp</dimen> <dimen name="notification_min_height">92dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class NotificationPanelView extends PanelView implements private boolean mExpandingFromHeadsUp; private boolean mExpandingFromHeadsUp; private boolean mCollapsedOnDown; private boolean mCollapsedOnDown; private int mPositionMinSideMargin; private int mPositionMinSideMargin; private int mMaxFadeoutHeight; private int mLastOrientation = -1; private int mLastOrientation = -1; private boolean mClosingWithAlphaFadeOut; private boolean mClosingWithAlphaFadeOut; private boolean mHeadsUpAnimatingAway; private boolean mHeadsUpAnimatingAway; Loading Loading @@ -278,6 +279,8 @@ public class NotificationPanelView extends PanelView implements R.dimen.qs_falsing_threshold); R.dimen.qs_falsing_threshold); mPositionMinSideMargin = getResources().getDimensionPixelSize( mPositionMinSideMargin = getResources().getDimensionPixelSize( R.dimen.notification_panel_min_side_margin); R.dimen.notification_panel_min_side_margin); mMaxFadeoutHeight = getResources().getDimensionPixelSize( R.dimen.max_notification_fadeout_height); } } public void updateResources() { public void updateResources() { Loading Loading @@ -552,7 +555,9 @@ public class NotificationPanelView extends PanelView implements protected void flingToHeight(float vel, boolean expand, float target, protected void flingToHeight(float vel, boolean expand, float target, float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) { mHeadsUpTouchHelper.notifyFling(!expand); mHeadsUpTouchHelper.notifyFling(!expand); setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f); setClosingWithAlphaFadeout(!expand && mNotificationStackScroller.getFirstChildIntrinsicHeight() <= mMaxFadeoutHeight && getFadeoutAlpha() == 1.0f); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class NotificationStackScrollLayout extends ViewGroup */ */ private float getExpandTranslationStart() { private float getExpandTranslationStart() { int startPosition = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp() int startPosition = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp() ? 0 : -getFirstChildMinHeight(); ? 0 : -getFirstChildIntrinsicHeight(); return startPosition - mTopPadding; return startPosition - mTopPadding; } } Loading Loading @@ -2140,17 +2140,17 @@ public class NotificationStackScrollLayout extends ViewGroup } } public int getLayoutMinHeight() { public int getLayoutMinHeight() { int firstChildMinHeight = getFirstChildMinHeight(); int firstChildMinHeight = getFirstChildIntrinsicHeight(); return Math.min(firstChildMinHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight, return Math.min(firstChildMinHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight, mMaxLayoutHeight - mTopPadding); mMaxLayoutHeight - mTopPadding); } } private int getFirstChildMinHeight() { public int getFirstChildIntrinsicHeight() { final ExpandableView firstChild = getFirstChildNotGone(); final ExpandableView firstChild = getFirstChildNotGone(); int firstChildMinHeight = firstChild != null int firstChildMinHeight = firstChild != null ? firstChild.getIntrinsicHeight() ? firstChild.getIntrinsicHeight() : mEmptyShadeView != null : mEmptyShadeView != null ? mEmptyShadeView.getMinHeight() ? mEmptyShadeView.getIntrinsicHeight() : mCollapsedSize; : mCollapsedSize; if (mOwnScrollY > 0) { if (mOwnScrollY > 0) { firstChildMinHeight = Math.max(firstChildMinHeight - mOwnScrollY, mCollapsedSize); firstChildMinHeight = Math.max(firstChildMinHeight - mOwnScrollY, mCollapsedSize); Loading