Skipping QS metrics if activity is not created

Test: presubmit
Bug: 177472265
Change-Id: Ic92adbe589736d16ab8687ea761c32919d8c186b
This commit is contained in:
vadimt 2021-01-14 13:42:35 -08:00
parent 4318289207
commit 5b97b40eb1
1 changed files with 6 additions and 3 deletions

View File

@ -175,9 +175,12 @@ public class OverviewCommandHelper {
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);