Loading packages/SystemUI/res/values/bools.xml +3 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ <!-- Whether to enable clipping on Quick Settings --> <bool name="qs_enable_clipping">true</bool> <!-- Whether to enable clipping on Notification Views --> <bool name="notification_enable_clipping">true</bool> <!-- Whether to enable transparent background for notification scrims --> <bool name="notification_scrim_transparent">false</bool> </resources> packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +7 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public class NotificationShelf extends ActivatableNotificationView implements private int[] mTmp = new int[2]; private boolean mHideBackground; private int mStatusBarHeight; private boolean mEnableNotificationClipping; private AmbientState mAmbientState; private NotificationStackScrollLayoutController mHostLayoutController; private int mPaddingBetweenElements; Loading Loading @@ -117,7 +118,7 @@ public class NotificationShelf extends ActivatableNotificationView implements // Setting this to first in section to get the clipping to the top roundness correct. This // value determines the way we are clipping to the top roundness of the overall shade setFirstInSection(true); initDimens(); updateResources(); } public void bind(AmbientState ambientState, Loading @@ -126,7 +127,7 @@ public class NotificationShelf extends ActivatableNotificationView implements mHostLayoutController = hostLayoutController; } private void initDimens() { private void updateResources() { Resources res = getResources(); mStatusBarHeight = SystemBarUtils.getStatusBarHeight(mContext); mPaddingBetweenElements = res.getDimensionPixelSize(R.dimen.notification_divider_height); Loading @@ -144,6 +145,7 @@ public class NotificationShelf extends ActivatableNotificationView implements mShowNotificationShelf = res.getBoolean(R.bool.config_showNotificationShelf); mCornerAnimationDistance = res.getDimensionPixelSize( R.dimen.notification_corner_animation_distance); mEnableNotificationClipping = res.getBoolean(R.bool.notification_enable_clipping); mShelfIcons.setInNotificationIconShelf(true); if (!mShowNotificationShelf) { Loading @@ -154,7 +156,7 @@ public class NotificationShelf extends ActivatableNotificationView implements @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); initDimens(); updateResources(); } @Override Loading Loading @@ -639,7 +641,8 @@ public class NotificationShelf extends ActivatableNotificationView implements } if (!isPinned) { if (viewEnd > notificationClipEnd && !shouldClipOwnTop) { int clipBottomAmount = (int) (viewEnd - notificationClipEnd); int clipBottomAmount = mEnableNotificationClipping ? (int) (viewEnd - notificationClipEnd) : 0; view.setClipBottomAmount(clipBottomAmount); } else { view.setClipBottomAmount(0); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +3 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class StackScrollAlgorithm { private float mGapHeight; private float mGapHeightOnLockscreen; private int mCollapsedSize; private boolean mEnableNotificationClipping; private StackScrollAlgorithmState mTempAlgorithmState = new StackScrollAlgorithmState(); private boolean mIsExpanded; Loading Loading @@ -85,6 +86,7 @@ public class StackScrollAlgorithm { mPaddingBetweenElements = res.getDimensionPixelSize( R.dimen.notification_divider_height); mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height); mEnableNotificationClipping = res.getBoolean(R.bool.notification_enable_clipping); mClipNotificationScrollToTop = res.getBoolean(R.bool.config_clipNotificationScrollToTop); int statusBarHeight = SystemBarUtils.getStatusBarHeight(context); mHeadsUpInset = statusBarHeight + res.getDimensionPixelSize( Loading Loading @@ -289,7 +291,7 @@ public class StackScrollAlgorithm { // The bottom of this view is peeking out from under the previous view. // Clip the part that is peeking out. float overlapAmount = newNotificationEnd - firstHeadsUpEnd; state.clipBottomAmount = (int) overlapAmount; state.clipBottomAmount = mEnableNotificationClipping ? (int) overlapAmount : 0; } else { state.clipBottomAmount = 0; } Loading Loading
packages/SystemUI/res/values/bools.xml +3 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ <!-- Whether to enable clipping on Quick Settings --> <bool name="qs_enable_clipping">true</bool> <!-- Whether to enable clipping on Notification Views --> <bool name="notification_enable_clipping">true</bool> <!-- Whether to enable transparent background for notification scrims --> <bool name="notification_scrim_transparent">false</bool> </resources>
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +7 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ public class NotificationShelf extends ActivatableNotificationView implements private int[] mTmp = new int[2]; private boolean mHideBackground; private int mStatusBarHeight; private boolean mEnableNotificationClipping; private AmbientState mAmbientState; private NotificationStackScrollLayoutController mHostLayoutController; private int mPaddingBetweenElements; Loading Loading @@ -117,7 +118,7 @@ public class NotificationShelf extends ActivatableNotificationView implements // Setting this to first in section to get the clipping to the top roundness correct. This // value determines the way we are clipping to the top roundness of the overall shade setFirstInSection(true); initDimens(); updateResources(); } public void bind(AmbientState ambientState, Loading @@ -126,7 +127,7 @@ public class NotificationShelf extends ActivatableNotificationView implements mHostLayoutController = hostLayoutController; } private void initDimens() { private void updateResources() { Resources res = getResources(); mStatusBarHeight = SystemBarUtils.getStatusBarHeight(mContext); mPaddingBetweenElements = res.getDimensionPixelSize(R.dimen.notification_divider_height); Loading @@ -144,6 +145,7 @@ public class NotificationShelf extends ActivatableNotificationView implements mShowNotificationShelf = res.getBoolean(R.bool.config_showNotificationShelf); mCornerAnimationDistance = res.getDimensionPixelSize( R.dimen.notification_corner_animation_distance); mEnableNotificationClipping = res.getBoolean(R.bool.notification_enable_clipping); mShelfIcons.setInNotificationIconShelf(true); if (!mShowNotificationShelf) { Loading @@ -154,7 +156,7 @@ public class NotificationShelf extends ActivatableNotificationView implements @Override protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); initDimens(); updateResources(); } @Override Loading Loading @@ -639,7 +641,8 @@ public class NotificationShelf extends ActivatableNotificationView implements } if (!isPinned) { if (viewEnd > notificationClipEnd && !shouldClipOwnTop) { int clipBottomAmount = (int) (viewEnd - notificationClipEnd); int clipBottomAmount = mEnableNotificationClipping ? (int) (viewEnd - notificationClipEnd) : 0; view.setClipBottomAmount(clipBottomAmount); } else { view.setClipBottomAmount(0); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +3 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class StackScrollAlgorithm { private float mGapHeight; private float mGapHeightOnLockscreen; private int mCollapsedSize; private boolean mEnableNotificationClipping; private StackScrollAlgorithmState mTempAlgorithmState = new StackScrollAlgorithmState(); private boolean mIsExpanded; Loading Loading @@ -85,6 +86,7 @@ public class StackScrollAlgorithm { mPaddingBetweenElements = res.getDimensionPixelSize( R.dimen.notification_divider_height); mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height); mEnableNotificationClipping = res.getBoolean(R.bool.notification_enable_clipping); mClipNotificationScrollToTop = res.getBoolean(R.bool.config_clipNotificationScrollToTop); int statusBarHeight = SystemBarUtils.getStatusBarHeight(context); mHeadsUpInset = statusBarHeight + res.getDimensionPixelSize( Loading Loading @@ -289,7 +291,7 @@ public class StackScrollAlgorithm { // The bottom of this view is peeking out from under the previous view. // Clip the part that is peeking out. float overlapAmount = newNotificationEnd - firstHeadsUpEnd; state.clipBottomAmount = (int) overlapAmount; state.clipBottomAmount = mEnableNotificationClipping ? (int) overlapAmount : 0; } else { state.clipBottomAmount = 0; } Loading