Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -511,10 +511,12 @@ public class AmbientState implements Dumpable { } } public int getTopPadding() { public int getTopPadding() { SceneContainerFlag.assertInLegacyMode(); return mTopPadding; return mTopPadding; } } public void setTopPadding(int topPadding) { public void setTopPadding(int topPadding) { SceneContainerFlag.assertInLegacyMode(); mTopPadding = topPadding; mTopPadding = topPadding; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +32 −24 Original line number Original line Diff line number Diff line Loading @@ -851,7 +851,7 @@ public class NotificationStackScrollLayout return; // the rest of the fields are not important in Flexiglass return; // the rest of the fields are not important in Flexiglass } } y = getTopPadding(); y = mAmbientState.getTopPadding(); drawDebugInfo(canvas, y, Color.RED, /* label= */ "getTopPadding() = " + y); drawDebugInfo(canvas, y, Color.RED, /* label= */ "getTopPadding() = " + y); y = getLayoutHeight(); y = getLayoutHeight(); Loading Loading @@ -1231,9 +1231,11 @@ public class NotificationStackScrollLayout @Override @Override public void setStackTop(float stackTop) { public void setStackTop(float stackTop) { if (mAmbientState.getStackTop() != stackTop) { mAmbientState.setStackTop(stackTop); mAmbientState.setStackTop(stackTop); // TODO(b/332574413): replace the following with using stackTop onTopPaddingChanged(/* animate = */ isAddOrRemoveAnimationPending()); updateTopPadding(stackTop, isAddOrRemoveAnimationPending()); setExpandedHeight(mExpandedHeight); } } } @Override @Override Loading Loading @@ -1386,12 +1388,15 @@ public class NotificationStackScrollLayout } } public int getTopPadding() { public int getTopPadding() { // TODO(b/332574413) replace all usages of getTopPadding() if (SceneContainerFlag.isEnabled()) { return (int) mAmbientState.getStackTop(); } else { return mAmbientState.getTopPadding(); return mAmbientState.getTopPadding(); } } } private void setTopPadding(int topPadding, boolean animate) { private void onTopPaddingChanged(boolean animate) { if (getTopPadding() != topPadding) { mAmbientState.setTopPadding(topPadding); boolean shouldAnimate = animate || mAnimateNextTopPaddingChange; boolean shouldAnimate = animate || mAnimateNextTopPaddingChange; updateAlgorithmHeightAndPadding(); updateAlgorithmHeightAndPadding(); updateContentHeight(); updateContentHeight(); Loading @@ -1408,7 +1413,6 @@ public class NotificationStackScrollLayout notifyHeightChangeListener(null, shouldAnimate); notifyHeightChangeListener(null, shouldAnimate); mAnimateNextTopPaddingChange = false; mAnimateNextTopPaddingChange = false; } } } /** /** * Apply expansion fraction to the y position and height of the notifications panel. * Apply expansion fraction to the y position and height of the notifications panel. Loading Loading @@ -2708,6 +2712,7 @@ public class NotificationStackScrollLayout * @param animate whether to animate the change * @param animate whether to animate the change */ */ public void updateTopPadding(float qsHeight, boolean animate) { public void updateTopPadding(float qsHeight, boolean animate) { SceneContainerFlag.assertInLegacyMode(); int topPadding = (int) qsHeight; int topPadding = (int) qsHeight; int minStackHeight = getLayoutMinHeightInternal(); int minStackHeight = getLayoutMinHeightInternal(); if (topPadding + minStackHeight > getHeight()) { if (topPadding + minStackHeight > getHeight()) { Loading @@ -2715,7 +2720,10 @@ public class NotificationStackScrollLayout } else { } else { mTopPaddingOverflow = 0; mTopPaddingOverflow = 0; } } setTopPadding(topPadding, animate && !mKeyguardBypassEnabled); if (mAmbientState.getTopPadding() != topPadding) { mAmbientState.setTopPadding(topPadding); onTopPaddingChanged(/* animate = */ animate && !mKeyguardBypassEnabled); } setExpandedHeight(mExpandedHeight); setExpandedHeight(mExpandedHeight); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1328,6 +1328,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } } public int getTopPadding() { public int getTopPadding() { SceneContainerFlag.assertInLegacyMode(); return mView.getTopPadding(); return mView.getTopPadding(); } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -511,10 +511,12 @@ public class AmbientState implements Dumpable { } } public int getTopPadding() { public int getTopPadding() { SceneContainerFlag.assertInLegacyMode(); return mTopPadding; return mTopPadding; } } public void setTopPadding(int topPadding) { public void setTopPadding(int topPadding) { SceneContainerFlag.assertInLegacyMode(); mTopPadding = topPadding; mTopPadding = topPadding; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +32 −24 Original line number Original line Diff line number Diff line Loading @@ -851,7 +851,7 @@ public class NotificationStackScrollLayout return; // the rest of the fields are not important in Flexiglass return; // the rest of the fields are not important in Flexiglass } } y = getTopPadding(); y = mAmbientState.getTopPadding(); drawDebugInfo(canvas, y, Color.RED, /* label= */ "getTopPadding() = " + y); drawDebugInfo(canvas, y, Color.RED, /* label= */ "getTopPadding() = " + y); y = getLayoutHeight(); y = getLayoutHeight(); Loading Loading @@ -1231,9 +1231,11 @@ public class NotificationStackScrollLayout @Override @Override public void setStackTop(float stackTop) { public void setStackTop(float stackTop) { if (mAmbientState.getStackTop() != stackTop) { mAmbientState.setStackTop(stackTop); mAmbientState.setStackTop(stackTop); // TODO(b/332574413): replace the following with using stackTop onTopPaddingChanged(/* animate = */ isAddOrRemoveAnimationPending()); updateTopPadding(stackTop, isAddOrRemoveAnimationPending()); setExpandedHeight(mExpandedHeight); } } } @Override @Override Loading Loading @@ -1386,12 +1388,15 @@ public class NotificationStackScrollLayout } } public int getTopPadding() { public int getTopPadding() { // TODO(b/332574413) replace all usages of getTopPadding() if (SceneContainerFlag.isEnabled()) { return (int) mAmbientState.getStackTop(); } else { return mAmbientState.getTopPadding(); return mAmbientState.getTopPadding(); } } } private void setTopPadding(int topPadding, boolean animate) { private void onTopPaddingChanged(boolean animate) { if (getTopPadding() != topPadding) { mAmbientState.setTopPadding(topPadding); boolean shouldAnimate = animate || mAnimateNextTopPaddingChange; boolean shouldAnimate = animate || mAnimateNextTopPaddingChange; updateAlgorithmHeightAndPadding(); updateAlgorithmHeightAndPadding(); updateContentHeight(); updateContentHeight(); Loading @@ -1408,7 +1413,6 @@ public class NotificationStackScrollLayout notifyHeightChangeListener(null, shouldAnimate); notifyHeightChangeListener(null, shouldAnimate); mAnimateNextTopPaddingChange = false; mAnimateNextTopPaddingChange = false; } } } /** /** * Apply expansion fraction to the y position and height of the notifications panel. * Apply expansion fraction to the y position and height of the notifications panel. Loading Loading @@ -2708,6 +2712,7 @@ public class NotificationStackScrollLayout * @param animate whether to animate the change * @param animate whether to animate the change */ */ public void updateTopPadding(float qsHeight, boolean animate) { public void updateTopPadding(float qsHeight, boolean animate) { SceneContainerFlag.assertInLegacyMode(); int topPadding = (int) qsHeight; int topPadding = (int) qsHeight; int minStackHeight = getLayoutMinHeightInternal(); int minStackHeight = getLayoutMinHeightInternal(); if (topPadding + minStackHeight > getHeight()) { if (topPadding + minStackHeight > getHeight()) { Loading @@ -2715,7 +2720,10 @@ public class NotificationStackScrollLayout } else { } else { mTopPaddingOverflow = 0; mTopPaddingOverflow = 0; } } setTopPadding(topPadding, animate && !mKeyguardBypassEnabled); if (mAmbientState.getTopPadding() != topPadding) { mAmbientState.setTopPadding(topPadding); onTopPaddingChanged(/* animate = */ animate && !mKeyguardBypassEnabled); } setExpandedHeight(mExpandedHeight); setExpandedHeight(mExpandedHeight); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1328,6 +1328,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } } public int getTopPadding() { public int getTopPadding() { SceneContainerFlag.assertInLegacyMode(); return mView.getTopPadding(); return mView.getTopPadding(); } } Loading