From 9377110f6372ee59fd5c333ddb7ecfc65ff804db Mon Sep 17 00:00:00 2001 From: Winson Date: Mon, 11 Jul 2016 19:49:26 -0700 Subject: [PATCH] Ensure that all places we bind tasks also update the doze state. Bug: 29548227 Change-Id: I352afa7fc0039b951f94a9de4a538aad7d1462f4 --- .../android/systemui/recents/views/TaskStackView.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index 93d1cdf0d4f6e..fef05562b98ba 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -1552,11 +1552,6 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal // Bind the task view to the new task bindTaskView(tv, task); - // If the doze trigger has already fired, then update the state for this task view - if (mUIDozeTrigger.isAsleep() || Recents.getSystemServices().hasFreeformWorkspaceSupport()) { - tv.setNoUserInteractionState(); - } - // Set the new state for this view, including the callbacks and view clipping tv.setCallbacks(this); tv.setTouchEnabled(true); @@ -1586,6 +1581,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal // Rebind the task and request that this task's data be filled into the TaskView tv.onTaskBound(task, mTouchExplorationEnabled, mDisplayOrientation, mDisplayRect); + // If the doze trigger has already fired, then update the state for this task view + if (mUIDozeTrigger.isAsleep() || + Recents.getSystemServices().hasFreeformWorkspaceSupport()) { + tv.setNoUserInteractionState(); + } + // Load the task data Recents.getTaskLoader().loadTaskData(task); }