Clean up ResolverActivity.getResolveInfoUserHandle
This function was a shim to read from ResolveInfo.userHandle, which we
added as a stopgap to unblock development on cloned-app support before
the field was actually populated from PackageManager (since we could
make reasonable "predictions" for the right value with logic based on
our own application UI). The PackageManager support has since caught up,
so this has been inlined to use the "real" field and we can now remove
the shim.
This CL also extends ResolverDataProvider to set userHandles in the fake
ResolveInfo instances we build for our tests. That wasn't necessary to
get our current tests to pass, but since we have logic that depends on
these fields, it seemed preferable to provide plausible values that
would better reflect any future issues.
Bug: 273294251
Test: IntentResolverUnitTests, CtsSharesheetDeviceTest
Change-Id: I541220f9e3ab945a1753cda0f8a53f22ab708876
5 files changed