The issue stems from adding the incorrect userid when first entering
the sharesheet. The flow from Photos sendkit directly to the work
profile sharesheet was setting the incorrect userid on the content
uris. Move this logic to the correct location.
Bug:
129280812
Test: Manually retest Photos->Share->Work Profile->Chat
Change-Id: I3660684336450172852cf86bea1f3c60cf15aa87
if (isSendAction(in)) {
in.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT |
Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
-
- in.fixUris(getUserId());
}
}
// At this point, innerIntent is not null. Otherwise, canForward would have returned
// false.
innerIntent.prepareToLeaveUser(callingUserId);
+ innerIntent.fixUris(callingUserId);
} else {
newIntent.prepareToLeaveUser(callingUserId);
}