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

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

Snap for 8827792 from 47ed514b to tm-qpr1-release

Change-Id: Ib36758887386374687cb5728891e23db7633003a
parents 6b19a6db 47ed514b
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -387,7 +387,8 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            mBgPaint.setColorFilter(cs.mBgFilter);
            mThemedFgColor = cs.mThemedFgColor;

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

            // Time needs to be applied here since drawInternal is NOT guaranteed to be called
@@ -396,6 +397,13 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
            mCanvasScale = 1 - 2 * mBoundsOffset;
        }

        @Override
        public void setAlpha(int alpha) {
            super.setAlpha(alpha);
            mBgPaint.setAlpha(alpha);
            mFG.setAlpha(alpha);
        }

        @Override
        protected void onBoundsChange(Rect bounds) {
            super.onBoundsChange(bounds);
@@ -434,8 +442,7 @@ public class ClockDrawableWrapper extends AdaptiveIconDrawable implements Bitmap
        protected void updateFilter() {
            super.updateFilter();
            int alpha = mIsDisabled ? (int) (mDisabledAlpha * FULLY_OPAQUE) : FULLY_OPAQUE;
            mBgPaint.setAlpha(alpha);
            mFG.setAlpha(alpha);
            setAlpha(alpha);
            mBgPaint.setColorFilter(mIsDisabled ? getDisabledColorFilter() : mBgFilter);
            mFG.setColorFilter(mIsDisabled ? getDisabledColorFilter() : null);
        }