Merge "Skipping swipe metrics if recents view doesn't exist" into sc-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2021-01-28 18:51:58 +00:00
commit 61096e9ba6
2 files changed
+12 -6

No files matched your search

@@ -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);
@@ -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) {