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
This commit is contained in:
Sreyas committed 2020-09-02 11:18:01 -07:00
1 parent 017c93488c
commit ed5e43bd25
1 file changed
+3 -1
@@ -315,6 +315,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) {
@@ -324,7 +327,6 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
if (mContextualChipWrapper != null) {
mContextualChipWrapper.setAlpha(comp(modalness));
}
updateFooterVerticalOffset(mFooterVerticalOffset);
}