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

Commit 0cdb2e74 authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Fixing crash in SysUI due to invalid group." into nyc-dev am: 814358a2

am: d93090d9

* commit 'd93090d9':
  Prevent callbacks during DrawableContainer child initialization

Change-Id: I54f2a3b4efc1073420dd84acff1c278c46161841
parents 2aa9e127 d93090d9
Loading
Loading
Loading
Loading
+35 −25
Original line number Diff line number Diff line
@@ -500,6 +500,13 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
     * @param d The drawable to initialize.
     */
    private void initializeDrawableForDisplay(Drawable d) {
        // Temporary fix for suspending callbacks during initialization. We
        // don't want any of these setters causing an invalidate() since that
        // may call back into DrawableContainer.
        final Callback cb = d.getCallback();
        d.setCallback(null);

        try {
            if (mDrawableContainerState.mEnterFadeDuration <= 0 && mHasAlpha) {
                d.setAlpha(mAlpha);
            }
@@ -529,6 +536,9 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
                d.setHotspotBounds(hotspotBounds.left, hotspotBounds.top,
                        hotspotBounds.right, hotspotBounds.bottom);
            }
        } finally {
            d.setCallback(cb);
        }
    }

    void animate(boolean schedule) {