Merge "Fixing crash when emptyView gets added twice" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2020-04-22 00:30:43 +00:00
commit 947905d28b
1 file changed
+1 -1
@@ -1098,7 +1098,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
*/
public void showCurrentTask(int runningTaskId) {
if (getTaskView(runningTaskId) == null) {
boolean wasEmpty = getTaskViewCount() == 0;
boolean wasEmpty = getChildCount() == 0;
// Add an empty view for now until the task plan is loaded and applied
final TaskView taskView = mTaskViewPool.getView();
addView(taskView, mTaskViewStartIndex);