Turn off filter ui if flag is off

Fix a bug in a condition determining when to show
filter ui for a certain taskview, making sure
that the ui is off when the feature flag for
multi-instance is off.

Test: reproduced the steps laid out in the bug

Bug: 264218764
Change-Id: Ie745789ad834d56b79de47e5196737eb08b081fa
This commit is contained in:
Ikram Gabiyev
2023-01-03 19:37:58 +00:00
parent 39688d2d61
commit 6d3ad6820d
3 changed files with 13 additions and 5 deletions

View File

@@ -561,10 +561,12 @@ public class TaskView extends FrameLayout implements Reusable {
*/
protected void updateFilterCallback(@NonNull View filterView,
@Nullable View.OnClickListener callback) {
// Filtering changes alpha instead of the visibility since visibility
// can be altered separately through RecentsView#resetFromSplitSelectionState()
if (callback == null) {
filterView.setVisibility(GONE);
filterView.setAlpha(0);
} else {
filterView.setVisibility(VISIBLE);
filterView.setAlpha(1);
}
filterView.setOnClickListener(callback);