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

Commit 91546d40 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Do not add jank monitor for stash state change when the drag layer is not attached to the window

An alternative here is to use the root layer when NO_RECREATE flag is on. However, we do not have a reference to it here (shall we consider passing it in?)

Fixes: 325096498
Test: Need to verify
Change-Id: I1709bc88753a90547f7a61dc6e24cdaf489d19e0
parent 92f9d10c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -803,6 +803,11 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
    private void addJankMonitorListener(
            AnimatorSet animator, boolean expanding, @StashAnimation int animationType) {
        View v = mControllers.taskbarActivityContext.getDragLayer();
        if (!v.isAttachedToWindow()) {
            // If the task bar drag layer is not attached to window, we don't need to monitor jank
            // (actually we can't pass in an unattached view either).
            return;
        }
        int action = expanding ? InteractionJankMonitor.CUJ_TASKBAR_EXPAND :
                InteractionJankMonitor.CUJ_TASKBAR_COLLAPSE;
        animator.addListener(new AnimatorListenerAdapter() {