Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve PendingIntent security check compatibility
This switches to secure-by-default instead of crash-by-default for API 31 to work around apps which have updated to API 31 without specifying either FLAG_MUTABLE or FLAG_IMMUTABLE for PendingIntents. If the app ends up needing the FLAG_MUTABLE behavior, it may crash later, but it should still be obvious why it happened. There are many apps with outdated Play services client libraries lacking support for Android 12 which are nonetheless targeting API 31 or higher and will crash in certain situations. Google Play services will ask the client library to request runtime permissions from the user on behalf of it when it thinks that they're required for an operation that's requested. The older client libraries will cause a crash in the app by trying to create a PendingIntent with no FLAG_MUTABLE or FLAG_IMMUTABLE specified. This is a much more common issue on GrapheneOS since Play services is a regular user installed app with no special access or privileges, and starts without any standard runtime permissions granted to it.
- Loading branch information