Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bf4596b authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

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

am: 62a098c7

Change-Id: I4e192cd13aa43f59e75d8d29011cd1a5cb92b753
parents f52474bc 62a098c7
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -197,6 +197,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
                mDarkAmount);
                mDarkAmount);
        final int outerBounds = mStatusBarIconSize;
        final int outerBounds = mStatusBarIconSize;
        mIconScale = (float)imageBounds / (float)outerBounds;
        mIconScale = (float)imageBounds / (float)outerBounds;
        updatePivot();
    }
    }


    private void updateIconScaleForSystemIcons() {
    private void updateIconScaleForSystemIcons() {
@@ -859,6 +860,12 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
            mLayoutRunnable.run();
            mLayoutRunnable.run();
            mLayoutRunnable = null;
            mLayoutRunnable = null;
        }
        }
        updatePivot();
    }

    private void updatePivot() {
        setPivotX((1 - mIconScale) / 2.0f * getWidth());
        setPivotY((getHeight() - mIconScale * getWidth()) / 2.0f);
    }
    }


    public void executeOnLayout(Runnable runnable) {
    public void executeOnLayout(Runnable runnable) {