From 3736f44f8e793366f3be75b9e74b513daf2629cf Mon Sep 17 00:00:00 2001 From: Schneider Victor-Tulias Date: Tue, 29 Oct 2024 14:26:11 -0400 Subject: [PATCH] Fix NPE in QuickstepTestInformationHandler#getWindowInsets Flag: EXEMPT fixing NPE Fixes: 28555142 Test: TAPL tests Change-Id: I722dfe196b93861723ef3de9961f0a30b9056583 --- .../android/quickstep/QuickstepTestInformationHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java index c3b9736293..2828a84f5e 100644 --- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java @@ -3,7 +3,6 @@ package com.android.quickstep; import static com.android.launcher3.taskbar.TaskbarThresholdUtils.getFromNavThreshold; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; -import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.os.Bundle; @@ -208,8 +207,9 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { RecentsAnimationDeviceState rads = new RecentsAnimationDeviceState(mContext); OverviewComponentObserver observer = new OverviewComponentObserver(mContext, rads); try { - return observer.getContainerInterface() - .getCreatedContainer().getRootView().getRootWindowInsets(); + RecentsViewContainer container = observer.getContainerInterface().getCreatedContainer(); + + return container == null ? null : container.getRootView().getRootWindowInsets(); } finally { observer.onDestroy(); rads.destroy();