Make contacts photo pickers compatible with new documents UI
The old contacts photo picker code was using unguaranteed behavior (that Intent.GET_CONTENT would support MediaStore.EXTRA_OUTPUT) and this caused it to not work anymore with the new document picker. This CL changes all usages of files to instead use URIs. Also, a FileProvider has been added to Contacts, to allow us to pass in URI pointing to our private cache in intent.setClipData with Intent.FLAG_GRANT_WRITE_URI_PERMISSION and Intent.FLAG_GRANT_READ_URI_PERMISSION so we no longer have to reply on the MediaStore.EXTRA_OUTPUT being parsed and supported. The use of the FileProvider also prevents unauthorized access to temporary files during the caching process. Bug: 10745342 Change-Id: Iaee3d7d112dd124a2f5596c4b9704ea75d3b3419
Loading
Please register or sign in to comment