Default to using SplitSelectSource drawable if TaskView icon drawable is null

* Alternative solution could be to set
onTaskViewVisibilityChanged(true) for the taskView that is about
to be dismissed so it loads it's taskIcon/thumbnail back from the cache
* However, that does still leave us open to race conditions (even though
we can be reasonably confident the icon is probably in the cache)
* Also made other changes to allow already public fields on some classes
to be mockable for unit testing

Fixes: 275267738
Test: Tested with fullscreen task at end of overview,
GroupedTaskView at end of overview,
Initiating split from home,
Initiating split from overview actions,
Initiating split from overview app icon

Change-Id: Ic9059c93c07b90f61c9f418d5d36d6ba201ff96a
This commit is contained in:
Vinit Nayak
2023-03-29 22:03:34 -07:00
parent 90259a6db4
commit ecca8eacbc
4 changed files with 198 additions and 9 deletions

View File

@@ -639,7 +639,7 @@ public class QuickstepLauncher extends Launcher {
PendingAnimation anim = new PendingAnimation(TABLET_HOME_TO_SPLIT.getDuration());
RectF startingTaskRect = new RectF();
final FloatingTaskView floatingTaskView = FloatingTaskView.getFloatingTaskView(this,
source.view, null /* thumbnail */, source.drawable, startingTaskRect);
source.getView(), null /* thumbnail */, source.getDrawable(), startingTaskRect);
floatingTaskView.setAlpha(1);
floatingTaskView.addStagingAnimation(anim, startingTaskRect, tempRect,
false /* fadeWithThumbnail */, true /* isStagedTask */);