commit | fd04f702d9e3da66ee0dc50173153254cbd1dfca | [log] [tgz] |
---|---|---|
author | Sunny Goyal <sunnygoyal@google.com> | Thu Apr 16 18:06:19 2020 -0700 |
committer | Sunny Goyal <sunnygoyal@google.com> | Thu Apr 16 18:06:50 2020 -0700 |
tree | 9faea2af07ecab25a3fe0fc2bc9f01f60edee55f | |
parent | 86932724e7ba3f7a1ffa3ae94333ce054426c0fa [diff] |
Fixing crash when emptyView gets added twice Bug: 152129003 Change-Id: Id86279ace164453d0126773af89e3c9309d40202
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index a18f7ba..4fd836d 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -1057,7 +1057,7 @@ */ 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);