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

Commit 6b19a6db authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8677352 from 19a01e22 to tm-qpr1-release

Change-Id: Ifbc70e198fe0a4034c440fd2154de92c4085c9ab
parents 35f7be17 19a01e22
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -389,6 +389,10 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap

            mFullDrawable = (AdaptiveIconDrawable) mAnimInfo.baseDrawableState.newDrawable();
            mFG = (LayerDrawable) mFullDrawable.getForeground();

            // Time needs to be applied here since drawInternal is NOT guaranteed to be called
            // before this foreground drawable is shown on the screen.
            mAnimInfo.applyTime(mTime, mFG);
            mCanvasScale = 1 - 2 * mBoundsOffset;
        }

@@ -421,18 +425,6 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            reschedule();
        }

        @Override
        public boolean setState(int[] stateSet) {
            // If the user has just pressed the clock icon, and the clock app is launching,
            // we don't want to change the time shown. Doing so can result in jank.
            for (int state: stateSet) {
                if (state == android.R.attr.state_pressed) {
                    return false;
                }
            }
            return super.setState(stateSet);
        }

        @Override
        public boolean isThemed() {
            return mBgPaint.getColorFilter() != null;