Add null check to offsetCaptionLocation
There is currently a bug that is causing window decorations to exist
even after the task they belong to has been deleted. This is causing a
null pointer exception here since we are searching for the TaskInfo of
an already deleted task using TaskOrganizer#getRunningTaskInfo which
causes it to return null.
Bug: 311273642
Test: Move task around and change windowing modes to make sure SysUi is
no longer crashing
Change-Id: I4972f041d36e345a40a026bdfc4c4077ff13dfe0
1 file changed