Make modal based UI changes in TaskView only if modalness changes.

Fixes issue with jittery displaying of suggestion chip, when entering overview.
Merging into master manually as automerger failed.
Tested:Manual

Change-Id: I8228c51b22d550cb8f0aa559f997060b571763f1
(cherry picked from commit ed5e43bd25)
This commit is contained in:
Sreyas
2020-08-28 10:59:00 -07:00
committed by Sunny Goyal
parent 54834b0909
commit 0da8d424e8
@@ -323,6 +323,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
* @param modalness [0, 1] 0 being in context with other tasks, 1 being shown on its own.
*/
public void setModalness(float modalness) {
if (mModalness == modalness) {
return;
}
mModalness = modalness;
mIconView.setAlpha(comp(modalness));
if (mContextualChip != null) {