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
Loading
Please register or sign in to comment