Don't try to use display of detached task to update insets

If insets overrides change on a detached task, it shouldn't
have an effect anyways, so don't try to access the display-content
(which will be null when detached)

Bug: 249151208
Test: atest NexusLauncherTests:com.android.launcher3.ui.TaplTestsLauncher3#testAppIconLaunchFromAllAppsFromHome
Change-Id: I97bbb569f99c4f7bdd7e865c9a8122fc6b49bc79
This commit is contained in:
Evan Rosky
2022-09-28 00:15:10 +00:00
parent 6f93cb8fb3
commit 22dd0b7e34

View File

@@ -477,7 +477,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
}
mLocalInsetsSourceProviders.remove(insetsTypes[i]);
}
mDisplayContent.getInsetsStateController().updateAboveInsetsState(true);
// Update insets if this window is attached.
if (mDisplayContent != null) {
mDisplayContent.getInsetsStateController().updateAboveInsetsState(true);
}
}
/**