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

Commit 52909d0b authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Fix taskbar instrumentation crash

This was crashing when there were no views in the taskbar. Now, we're using getDragLayer, that will be always there.

Bug: 245690391
Test: TaskbarExpandCollapse
Change-Id: I4475adb0c6c425fca54af02bb071ed3e5f42d927
parent c528e7e8
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -49,8 +49,6 @@ import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.SystemUiProxy;

import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Optional;
import java.util.StringJoiner;
import java.util.function.IntPredicate;

@@ -546,13 +544,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
    }

    private void addJankMonitorListener(AnimatorSet animator, boolean expanding) {
        Optional<View> optionalView =
                Arrays.stream(mControllers.taskbarViewController.getIconViews()).findFirst();
        if (optionalView.isEmpty()) {
            Log.wtf(TAG, "No views to start Interaction jank monitor with.", new Exception());
            return;
        }
        View v = optionalView.get();
        View v = mControllers.taskbarActivityContext.getDragLayer();
        int action = expanding ? InteractionJankMonitor.CUJ_TASKBAR_EXPAND :
                InteractionJankMonitor.CUJ_TASKBAR_COLLAPSE;
        animator.addListener(new AnimatorListenerAdapter() {