且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么Images.Media.insertImage不需要WRITE_EXTERNAL_STORAG​​E权限

更新时间:2022-11-17 08:00:05

也许在依赖于内容提供商 MediaStore ,您可以通过它来插入,这是一个RPC调用。在源$ C ​​$ c中的 MediaStore 提供商:包装/供应商/ MediaProvider ,在它的表现定义权限

maybe in depend on the content provider MediaStore, you through it to insert, it's a RPC invoke. and the MediaStore provider in source code: packages/providers/MediaProvider, in it's manifest define the permission

<使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAG​​E/>

可能是它的原因。