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

Commit 8b6f6723 authored by Tony Wickham's avatar Tony Wickham Committed by Automerger Merge Worker
Browse files

Save and restore ClockIconDrawable canvas when modifying it am: e9b327ea am: 8481f74e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/systemui/+/15667958

Change-Id: I24e40a3adf0d40f535c39610f973a75187efc41e
parents 5f217174 8481f74e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,10 +25,8 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
@@ -373,10 +371,12 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            // prepare and draw the foreground
            mInfo.animInfo.applyTime(mTime, mForeground);

            int saveCount = canvas.save();
            canvas.scale(mInfo.scale, mInfo.scale,
                    bounds.exactCenterX() + mInfo.offset, bounds.exactCenterY() + mInfo.offset);
            canvas.clipPath(mFullDrawable.getIconMask());
            mForeground.draw(canvas);
            canvas.restoreToCount(saveCount);

            reschedule();
        }