From d7eb1ef7f4827df1ecb1c3a1aa0fc3efe316f7ef Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 4 Feb 2016 15:08:01 -0800 Subject: [PATCH] Fixing issue with history icons getting clobbered. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - If the view holder is rebound before the other task is recycled, there could be multiple callbacks attached to different tasks for the same view holder, which can cause the wrong icon (which is loaded in the bg, to be loaded into the wrong view holder). Now, we unbind the callback from the old task when the new task’s callbacks are bound. Change-Id: If0dfada24985944daf4302c4db0616a00a770f06 --- .../history/RecentsHistoryAdapter.java | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java b/packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java index ee3eb02c8a38d..5eeda72637ea4 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java @@ -67,9 +67,30 @@ public class RecentsHistoryAdapter extends RecyclerView.Adapter