OSDN Git Service

Default grants: handle update system packages
authorSvetoslav <svetoslavganov@google.com>
Wed, 29 Jul 2015 21:00:18 +0000 (14:00 -0700)
committerSvetoslav <svetoslavganov@google.com>
Wed, 29 Jul 2015 21:00:30 +0000 (14:00 -0700)
commit4aa97977863e01af3803afcee97292109bbec97c
tree55df691b543d9fedb42ebc9db8412143115ce4d0
parenteda1cc50cead674287616e6a852f8f281b70b9f5
Default grants: handle update system packages

If there is an app on the system image that gets default
grants but it is updated with a version that does not use
all permissions the version on the system image does, we
would wrongly try to grant a permission to the updated app
that it does not request and crash as a result. Now we
default grant permission that are requested by the system
version of the app regardless if it is updated but only if
the system app is not updated or the update also uses these
permissions.

bug:22800767

Change-Id: Ic22b62ba4976367420a56bdadc8e3824b0b9104f
services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java