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

Commit 26690516 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing itemInfoMatcher not working for folders

Bug: 197686628
Test: Manual
Change-Id: Ie43a55be6cce4bc73e38525388d744a649dbc740
parent ce10de79
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -32,6 +32,11 @@ import java.util.Set;
 */
 */
public interface ItemInfoMatcher {
public interface ItemInfoMatcher {


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

    boolean matches(ItemInfo info, ComponentName cn);
    boolean matches(ItemInfo info, ComponentName cn);


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