Skipping QS metrics if activity is not created
Test: presubmit
Bug: 177472265
Change-Id: Ic92adbe589736d16ab8687ea761c32919d8c186b
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index ec6e303..985389e 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -175,9 +175,12 @@
return;
}
- InteractionJankMonitorWrapper.begin(
- mActivityInterface.getCreatedActivity().getRootView(),
- InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
+ final T activity = mActivityInterface.getCreatedActivity();
+ if (activity != null) {
+ InteractionJankMonitorWrapper.begin(
+ activity.getRootView(),
+ InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
+ }
// Otherwise, start overview.
mListener = mActivityInterface.createActivityInitListener(this::onActivityReady);