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
This commit is contained in:
Winson Chung
2018-11-09 15:43:06 -08:00
parent f1982fcaae
commit 4e362ea0f5
@@ -300,6 +300,7 @@ public class TaskView extends FrameLayout implements PageCallbacks {
});
} else {
mIconView.setDrawable(null);
mIconView.setOnClickListener(null);
mIconView.setOnLongClickListener(null);
}
}