Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ public class NotificationShelf extends ActivatableNotificationView { } else { mViewInvertHelper.update(dark); } mShelfIcons.setCentered(dark); } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +14 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { private int mActualLayoutWidth = NO_VALUE; private float mActualPaddingEnd = NO_VALUE; private float mActualPaddingStart = NO_VALUE; private boolean mCentered; private boolean mChangingViewPositions; private int mAddAnimationStartIndex = -1; private int mCannedAnimationStartIndex = -1; Loading Loading @@ -310,6 +311,15 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { numDots++; } } if (mCentered && translationX < getLayoutEnd()) { float delta = (getLayoutEnd() - translationX) / 2; for (int i = 0; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); iconState.xTranslation += delta; } } if (isLayoutRtl()) { for (int i = 0; i < childCount; i++) { View view = getChildAt(i); Loading Loading @@ -379,6 +389,10 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { mChangingViewPositions = changingViewPositions; } public void setCentered(boolean centered) { mCentered = centered; } public IconState getIconState(StatusBarIconView icon) { return mIconStates.get(icon); } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +10 −2 Original line number Diff line number Diff line Loading @@ -1879,12 +1879,16 @@ public class NotificationStackScrollLayout extends ViewGroup float previousIncreasedAmount = 0.0f; int numShownItems = 0; boolean finish = false; int maxDisplayedNotifications = mAmbientState.isDark() ? (mPulsing ? 1 : 0) : mMaxDisplayedNotifications; for (int i = 0; i < getChildCount(); i++) { ExpandableView expandableView = (ExpandableView) getChildAt(i); if (expandableView.getVisibility() != View.GONE && !expandableView.hasNoContentHeight()) { if (mMaxDisplayedNotifications != -1 && numShownItems >= mMaxDisplayedNotifications) { if (maxDisplayedNotifications != -1 && numShownItems >= maxDisplayedNotifications) { expandableView = mShelf; finish = true; } Loading Loading @@ -3477,6 +3481,8 @@ public class NotificationStackScrollLayout extends ViewGroup updateBackground(); setWillNotDraw(false); } updateContentHeight(); notifyHeightChangeListener(mShelf); } private void setBackgroundFadeAmount(float fadeAmount) { Loading Loading @@ -3912,6 +3918,8 @@ public class NotificationStackScrollLayout extends ViewGroup public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateNotificationAnimationStates(); updateContentHeight(); notifyHeightChangeListener(mShelf); } public void setFadingOut(boolean fadingOut) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +1 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ public class NotificationShelf extends ActivatableNotificationView { } else { mViewInvertHelper.update(dark); } mShelfIcons.setCentered(dark); } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +14 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { private int mActualLayoutWidth = NO_VALUE; private float mActualPaddingEnd = NO_VALUE; private float mActualPaddingStart = NO_VALUE; private boolean mCentered; private boolean mChangingViewPositions; private int mAddAnimationStartIndex = -1; private int mCannedAnimationStartIndex = -1; Loading Loading @@ -310,6 +311,15 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { numDots++; } } if (mCentered && translationX < getLayoutEnd()) { float delta = (getLayoutEnd() - translationX) / 2; for (int i = 0; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); iconState.xTranslation += delta; } } if (isLayoutRtl()) { for (int i = 0; i < childCount; i++) { View view = getChildAt(i); Loading Loading @@ -379,6 +389,10 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { mChangingViewPositions = changingViewPositions; } public void setCentered(boolean centered) { mCentered = centered; } public IconState getIconState(StatusBarIconView icon) { return mIconStates.get(icon); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +10 −2 Original line number Diff line number Diff line Loading @@ -1879,12 +1879,16 @@ public class NotificationStackScrollLayout extends ViewGroup float previousIncreasedAmount = 0.0f; int numShownItems = 0; boolean finish = false; int maxDisplayedNotifications = mAmbientState.isDark() ? (mPulsing ? 1 : 0) : mMaxDisplayedNotifications; for (int i = 0; i < getChildCount(); i++) { ExpandableView expandableView = (ExpandableView) getChildAt(i); if (expandableView.getVisibility() != View.GONE && !expandableView.hasNoContentHeight()) { if (mMaxDisplayedNotifications != -1 && numShownItems >= mMaxDisplayedNotifications) { if (maxDisplayedNotifications != -1 && numShownItems >= maxDisplayedNotifications) { expandableView = mShelf; finish = true; } Loading Loading @@ -3477,6 +3481,8 @@ public class NotificationStackScrollLayout extends ViewGroup updateBackground(); setWillNotDraw(false); } updateContentHeight(); notifyHeightChangeListener(mShelf); } private void setBackgroundFadeAmount(float fadeAmount) { Loading Loading @@ -3912,6 +3918,8 @@ public class NotificationStackScrollLayout extends ViewGroup public void setPulsing(boolean pulsing) { mPulsing = pulsing; updateNotificationAnimationStates(); updateContentHeight(); notifyHeightChangeListener(mShelf); } public void setFadingOut(boolean fadingOut) { Loading