AOD: Scale icon padding with the drawing size
Fixes an issue where the icon placement algorithm would not take into account the drawingScale of the icon. Change-Id: Ia6b7e7d32ce584b04035b45d2abc61e0e4590ee8 Test: Trigger AOD1, observe that icons are correctly spaced, also test transition to lockscreen and observe there's no jank Fixes: 62205097
This commit is contained in:
@@ -179,6 +179,10 @@ public class StatusBarIconView extends AnimatedImageView {
|
||||
mIconScale = (float)imageBounds / (float)outerBounds;
|
||||
}
|
||||
|
||||
public float getIconScaleFullyDark() {
|
||||
return (float) mStatusBarIconDrawingSizeDark / mStatusBarIconDrawingSize;
|
||||
}
|
||||
|
||||
public float getIconScale() {
|
||||
return mIconScale;
|
||||
}
|
||||
|
||||
@@ -267,6 +267,9 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
||||
boolean forceOverflow = mSpeedBumpIndex != -1 && i >= mSpeedBumpIndex
|
||||
&& iconState.iconAppearAmount > 0.0f || i >= maxVisibleIcons;
|
||||
boolean noOverflowAfter = i == childCount - 1;
|
||||
float drawingScale = mDark && view instanceof StatusBarIconView
|
||||
? ((StatusBarIconView) view).getIconScaleFullyDark()
|
||||
: 1f;
|
||||
if (mOpenedAmount != 0.0f) {
|
||||
noOverflowAfter = noOverflowAfter && !hasAmbient && !forceOverflow;
|
||||
}
|
||||
@@ -303,7 +306,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
||||
visualOverflowStart += mVisualOverflowAdaption * (1f - mOpenedAmount);
|
||||
}
|
||||
}
|
||||
translationX += iconState.iconAppearAmount * view.getWidth();
|
||||
translationX += iconState.iconAppearAmount * view.getWidth() * drawingScale;
|
||||
}
|
||||
if (firstOverflowIndex != -1) {
|
||||
int numDots = 1;
|
||||
|
||||
Reference in New Issue
Block a user