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

Commit 245ae914 authored by Sherry Zhou's avatar Sherry Zhou
Browse files

Fix metro clock changes to wrong clock after previewing while using shared lottie assets

Test: manual
Bug: 302873891
Change-Id: I66f0d07b368fa62d0d8749af8711a4fd87a121b9
parent 564a0e2e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -22,10 +22,10 @@ import androidx.core.content.res.ResourcesCompat;

import com.android.app.animation.Interpolators;
import com.android.keyguard.dagger.KeyguardStatusViewScope;
import com.android.systemui.res.R;
import com.android.systemui.log.LogBuffer;
import com.android.systemui.log.core.LogLevel;
import com.android.systemui.plugins.ClockController;
import com.android.systemui.res.R;
import com.android.systemui.shared.clocks.DefaultClockController;

import java.io.PrintWriter;
@@ -452,6 +452,10 @@ public class KeyguardClockSwitch extends RelativeLayout {
    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);
        // TODO: b/305022530
        if (mClock.getConfig().getId().equals("DIGITAL_CLOCK_METRO")) {
            mClock.getEvents().onColorPaletteChanged(mContext.getResources());
        }

        if (changed) {
            post(() -> updateClockTargetRegions());