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

Commit 8c1866cd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Treat mimegroup as wildcard for app enumeration" into rvc-dev am: cd1c4786 am: 17ccecea

Change-Id: I4eaef11ad094f856e5a28f4065d162d968f8f8f3
parents c33e50a4 17ccecea
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -1581,12 +1581,13 @@ public class IntentFilter implements Parcelable {
     * @param wildcardSupported if true, will allow parameters to use wildcards
     * @param wildcardSupported if true, will allow parameters to use wildcards
     */
     */
    private int matchData(String type, String scheme, Uri data, boolean wildcardSupported) {
    private int matchData(String type, String scheme, Uri data, boolean wildcardSupported) {
        final ArrayList<String> types = mDataTypes;
        final boolean wildcardWithMimegroups = wildcardSupported && countMimeGroups() != 0;
        final List<String> types = mDataTypes;
        final ArrayList<String> schemes = mDataSchemes;
        final ArrayList<String> schemes = mDataSchemes;


        int match = MATCH_CATEGORY_EMPTY;
        int match = MATCH_CATEGORY_EMPTY;


        if (types == null && schemes == null) {
        if (!wildcardWithMimegroups && types == null && schemes == null) {
            return ((type == null && data == null)
            return ((type == null && data == null)
                ? (MATCH_CATEGORY_EMPTY+MATCH_ADJUSTMENT_NORMAL) : NO_MATCH_DATA);
                ? (MATCH_CATEGORY_EMPTY+MATCH_ADJUSTMENT_NORMAL) : NO_MATCH_DATA);
        }
        }
@@ -1641,7 +1642,9 @@ public class IntentFilter implements Parcelable {
            }
            }
        }
        }


        if (types != null) {
        if (wildcardWithMimegroups) {
            return MATCH_CATEGORY_TYPE;
        } else if (types != null) {
            if (findMimeType(type)) {
            if (findMimeType(type)) {
                match = MATCH_CATEGORY_TYPE;
                match = MATCH_CATEGORY_TYPE;
            } else {
            } else {