Fix domain collection for wildcards

The provided pattern won't match hosts that start with *. that are
intended to catch all subdomains.

Also transforms wildcard domains to their non-wildcard subdomain as
some implementations of v1 don't handle wildcards.

Bug: 179686283

Test: android.os.cts.OsHostTests#testIntentFilterHostValidation

Change-Id: I61d2a20495b9394c25739285c4a480c06fba5f76
2 files changed