Skip to content
Commit 9960437e authored by Himanshu Gupta's avatar Himanshu Gupta
Browse files

Populating ResolveInfo.UserHandle for explicit intents resolution.

ResolveInfo.UserHandle was added to allow callers like sharesheet
to start cross-profile activities resolutions in correct user space
vis-a-vis clone profile's use case.

Currently this field is only populated for implicit intents, but
Sharesheet has a use case where an app can suuply initial intents
as explicit ones. In this case, pm does not set the userHandle in
returned ResolveInfo, causing NPE in sharesheet while starting the
activity. (As sharesheet expects the userHandle to start activity
be derived from resolveInfo.userHandle)

This change adds the context's userHandle as the userspace to
resolve explicit intents into.

Bug: 273776367
Test: android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: I46a4ed84289fc7f3292ddd37342afc9b1d778214
parent 7871be0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment