Merge "Fixed a flickering of the icon when it goes into the shelf" into pi-dev

am: 40e41a6299

Change-Id: I37585d06d53e6213f163a38592605c855b551539
This commit is contained in:
Selim Cinek
2018-06-08 16:00:57 -07:00
committed by android-build-merger

View File

@@ -197,6 +197,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
mDarkAmount);
final int outerBounds = mStatusBarIconSize;
mIconScale = (float)imageBounds / (float)outerBounds;
updatePivot();
}
private void updateIconScaleForSystemIcons() {
@@ -859,6 +860,12 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
mLayoutRunnable.run();
mLayoutRunnable = null;
}
updatePivot();
}
private void updatePivot() {
setPivotX((1 - mIconScale) / 2.0f * getWidth());
setPivotY((getHeight() - mIconScale * getWidth()) / 2.0f);
}
public void executeOnLayout(Runnable runnable) {