Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d9eaf0c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing itemInfoMatcher not working for folders" into sc-v2-dev

parents b44b73ee 26690516
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -32,6 +32,11 @@ import java.util.Set;
 */
public interface ItemInfoMatcher {

    /**
     * Empty component used for match testing
     */
    ComponentName EMPTY_COMPONENT = new ComponentName("", "");

    boolean matches(ItemInfo info, ComponentName cn);

    /**
@@ -40,7 +45,7 @@ public interface ItemInfoMatcher {
    default boolean matchesInfo(ItemInfo info) {
        if (info != null) {
            ComponentName cn = info.getTargetComponent();
            return cn != null && matches(info, cn);
            return matches(info, cn != null ? cn : EMPTY_COMPONENT);
        } else {
            return false;
        }