From 4e362ea0f5ffdcca132730a954d8db142fd6e5a9 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 9 Nov 2018 15:43:06 -0800 Subject: [PATCH] Clear click listener when the icon is removed. - The click listener should be removed, otherwise, it can still active and clickable when the TaskView is bound to a new Task whose icon has not yet been loaded, which can cause crash. Bug: 118834133 Change-Id: Ifd9fd8fe99b6177851d366f0c21f8fad59f1950e --- quickstep/src/com/android/quickstep/views/TaskView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index 6834070165..9aaaf9cc7c 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -300,6 +300,7 @@ public class TaskView extends FrameLayout implements PageCallbacks { }); } else { mIconView.setDrawable(null); + mIconView.setOnClickListener(null); mIconView.setOnLongClickListener(null); } }