Fix sharing into a locked work profile
Change ActivityStartInterceptor.interceptWithConfirmCredentialsIfNeeded to create the intent for the original sender under the original caller uid, not the binder calling uid (which may be the system). This fixes the issue which happens when: * There's a work profile on the device. * The work profile has a separate challenge. * The work profile is locked using that challenge. * The user shares a resource into the work profile. Under those circumstances, the user is asked to unlock the work profile, but as a part of that process the grant to the resource is lost, so that when the user chooses the app in the work profile, that app no longer has a grant to the resource. When the activity is started from the right uid then the grant is accessible. Bug: 123017711 Test: Manual, set up a work profile with TestDPC, ensure it has a separate lock challenge and share a picture file from the personal profile to the (locked) work profile. Change-Id: I7a55e4bdc4709caec2c5ef4466b720ca786ebfe3 Merged-In: I7a55e4bdc4709caec2c5ef4466b720ca786ebfe3 (cherry picked from commit c6be5098)
Loading
Please register or sign in to comment