Simplifying some view iteration methods

Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ieffa3a66fbf8595d542995c348df578a3aec9083
This commit is contained in:
Sunny Goyal
2025-02-27 11:56:36 -08:00
parent 3848c51edb
commit 476d926972
16 changed files with 136 additions and 202 deletions
@@ -1191,8 +1191,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
* 3) All Apps button
*/
public View getFirstIconMatch(Predicate<ItemInfo> matcher) {
Predicate<ItemInfo> collectionMatcher = ItemInfoMatcher.forFolderMatch(matcher);
return mTaskbarView.getFirstMatch(matcher, collectionMatcher);
View icon = mModelCallbacks.getFirstMatch(matcher, ItemInfoMatcher.forFolderMatch(matcher));
return icon != null ? icon : mTaskbarView.getAllAppsButtonContainer();
}
/**