列入白名单对 WRITE_EXTERNAL_STORAGE 意味着什么?

What does whitelisted mean for WRITE_EXTERNAL_STORAGE?

对于WRITE_EXTERNAL_STORAGE权限的docs说:

If this permission is not whitelisted for an app that targets an API level before Build.VERSION_CODES.Q this permission cannot be granted to apps.

这是什么意思,权限怎么可能是"whitelisted"?

在您所说的上下文中,一些以特定权限为目标的应用程序会被“取消”。 根据 permission docs:

Over time, new restrictions may be added to the platform such that, in order to use certain APIs, your app must request a permission that it previously did not need. Because existing apps assume access to those APIs is freely available, Android may apply the new permission request to the app's manifest to avoid breaking the app on the new platform version (thereby, "grandfathering" your app for the permission). Android makes the decision as to whether an app might need the permission based on the value provided for the targetSdkVersion attribute. If the value is lower than the version in which the permission was added, then Android adds the permission.

For example, the READ_EXTERNAL_STORAGE permission is enforced beginning with API level 19 to restrict access to the shared storage space. If your targetSdkVersion is 18 or lower, this permission is added to your app on newer versions of Android.