mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Replacing ItemInfoMatcher with predicate
This removed unnecessary componentName lookups when it is not required. Many checks just rely on IDs and userHandle Bug: 231153610 Test: Presubmit Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
This commit is contained in:
@@ -47,6 +47,7 @@ import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.AnimatedFloat;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Handles properties/data collection, then passes the results to TaskbarView to render.
|
||||
@@ -309,8 +310,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
* 2) FolderIcon of the Folder containing the given icon
|
||||
* 3) All Apps button
|
||||
*/
|
||||
public View getFirstIconMatch(ItemInfoMatcher matcher) {
|
||||
ItemInfoMatcher folderMatcher = ItemInfoMatcher.forFolderMatch(matcher);
|
||||
public View getFirstIconMatch(Predicate<ItemInfo> matcher) {
|
||||
Predicate<ItemInfo> folderMatcher = ItemInfoMatcher.forFolderMatch(matcher);
|
||||
return mTaskbarView.getFirstMatch(matcher, folderMatcher);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user