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

Commit 87a7a1d9 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Reduce extra invocation of ThreadLocal in AnimationHandler" into main

parents 414ef5f3 142ff6cd
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@ public class AnimationHandler {
        }
    };

    public final static ThreadLocal<AnimationHandler> sAnimatorHandler = new ThreadLocal<>();
    public static final ThreadLocal<AnimationHandler> sAnimatorHandler =
            ThreadLocal.withInitial(AnimationHandler::new);
    private static AnimationHandler sTestHandler = null;
    private boolean mListDirty = false;

@@ -118,9 +119,6 @@ public class AnimationHandler {
        if (sTestHandler != null) {
            return sTestHandler;
        }
        if (sAnimatorHandler.get() == null) {
            sAnimatorHandler.set(new AnimationHandler());
        }
        return sAnimatorHandler.get();
    }