Track pending task info & if the task doesn't launch clean it up
If a task fails to launch, we need to tell clients of TaskView that the task didn't launch. To do this, we need to have a reference to TaskInfo so that we can notify clients and actually remove the task. We know the task failed to launch if it isn't found in the transition animation. We don't have a reference of the TaskInfo there so we need to rely on onTaskAppeared to get the info. The order of onTaskAppeared and the transition animation isn't guaranteed so we set a bit from the transition if it failed & check that in onTaskAppeared (and vice versa). Bug: 283461350 Test: TaskViewTransitionsTest TaskViewTest Test: manual - must be on tablet with lock, enable home controls to show on lockscreen, install CtsDeviceControlsApp and add a control (note this only repros because currently CtsDeviceControlsApp sets a flag to hide itself on lockscreen which manifests the bug) - lock the device - longpress on homecontrols shortcut icon => observe the logs and nothing crashes (although the device flickers a lot between lockscreen & controls) Change-Id: I28e0b2c60889d38f422831935564ef739fd3ef3c Merged-In: I28e0b2c60889d38f422831935564ef739fd3ef3c
Loading
Please register or sign in to comment