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

Commit 068de168 authored by vadimt's avatar vadimt
Browse files

Skipping swipe metrics if recents view doesn't exist

This will skip generating metrics for fallback recents,
which is not a big loss

Test: manual
Bug: 177472265
Change-Id: I0e167ddc3276246510ea5a22ba04dfd53a8d4eac
parent f1db62cc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -721,11 +721,12 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends

    @UiThread
    public void onGestureStarted(boolean isLikelyToStartNewTask) {
        // Temporarily disable this until we have a view that we can use
        // InteractionJankMonitorWrapper.begin(mRecentsView,
        //         InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */);
        // InteractionJankMonitorWrapper.begin(mRecentsView,
        //         InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
        if (mRecentsView != null) {
            InteractionJankMonitorWrapper.begin(mRecentsView,
                    InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */);
            InteractionJankMonitorWrapper.begin(mRecentsView,
                    InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
        }
        notifyGestureStartedAsync();
        setIsLikelyToStartNewTask(isLikelyToStartNewTask, false /* animate */);
        mStateCallback.setStateOnUiThread(STATE_GESTURE_STARTED);
+6 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.launcher3.BuildConfig;
import com.android.launcher3.MainProcessInitializer;
import com.android.launcher3.util.Executors;
import com.android.quickstep.logging.SettingsChangeLogger;
import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import com.android.systemui.shared.system.ThreadedRendererCompat;

@SuppressWarnings("unused")
@@ -35,7 +36,11 @@ public class QuickstepProcessInitializer extends MainProcessInitializer {
    private static final String TAG = "QuickstepProcessInitializer";
    private static final int SETUP_DELAY_MILLIS = 5000;

    public QuickstepProcessInitializer(Context context) { }
    public QuickstepProcessInitializer(Context context) {
        // Fake call to create an instance of InteractionJankMonitor to avoid binder calls during
        // its initialization during transitions.
        InteractionJankMonitorWrapper.cancel(-1);
    }

    @Override
    protected void init(Context context) {