Does safe authority comparison in AppsFilter

This change makes the authority comparison when adding packages to the
AppsFilter handle null authorities on a ProviderInfo. This is necessary
due to the current handling of duplicate authorities in system apps.
Instead of failing the build or removing the provider, we just nullify
the authority. This will be addressed more directly in b/143901347

Bug: 143901347
Fixes: 141867657
Test: atest AppEnumerationTests (on walleye)
Change-Id: Iabbc128cebf389b06a6f6f84536ee87492673dd9
This commit is contained in:
Patrick Baumann
2019-11-04 14:13:41 -08:00
parent f4e2b788b3
commit ed2a4701d9

View File

@@ -211,7 +211,7 @@ public class AppsFilter {
final Uri data = intent.getData();
if ("content".equalsIgnoreCase(intent.getScheme())
&& data != null
&& providerInfo.authority.equalsIgnoreCase(data.getAuthority())) {
&& Objects.equals(providerInfo.authority, data.getAuthority())) {
return true;
}
}