Merge "Don't assume host is wildcard if not provided" into rvc-dev am: a1b6280ec8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12118654 Change-Id: Id4a840f64e04228de024ee755edb0a1e51466edc
This commit is contained in:
@@ -1168,7 +1168,12 @@ public class IntentFilter implements Parcelable {
|
||||
public int match(Uri data, boolean wildcardSupported) {
|
||||
String host = data.getHost();
|
||||
if (host == null) {
|
||||
return NO_MATCH_DATA;
|
||||
if (wildcardSupported && mWild) {
|
||||
// special case, if no host is provided, but the Authority is wildcard, match
|
||||
return MATCH_CATEGORY_HOST;
|
||||
} else {
|
||||
return NO_MATCH_DATA;
|
||||
}
|
||||
}
|
||||
if (false) Log.v("IntentFilter",
|
||||
"Match host " + host + ": " + mHost);
|
||||
|
||||
@@ -1510,7 +1510,7 @@ public class ParsingPackageUtils {
|
||||
|
||||
Uri data = null;
|
||||
String dataType = null;
|
||||
String host = IntentFilter.WILDCARD;
|
||||
String host = null;
|
||||
final int numActions = intentInfo.countActions();
|
||||
final int numSchemes = intentInfo.countDataSchemes();
|
||||
final int numTypes = intentInfo.countDataTypes();
|
||||
|
||||
Reference in New Issue
Block a user