OSDN Git Service

Fix bugs when system apps reclaim permissions.
authorJeff Sharkey <jsharkey@android.com>
Fri, 19 Sep 2014 18:08:45 +0000 (11:08 -0700)
committerJeff Sharkey <jsharkey@android.com>
Fri, 19 Sep 2014 18:11:25 +0000 (11:11 -0700)
commitbfed9f34c0cf7cdf7d25e6a7677e03f5a3d87e0e
treedc5c61c8a3e7f10949d93fdf9d594f658af63b90
parentddc5e5f1c60f5fc491c9299a0afd280f8fdc252b
Fix bugs when system apps reclaim permissions.

Recently we started letting system apps always take precedence over
third-party apps when defining permissions.  This change fixes that
logic to claim the permission immediately, instead of delaying until
after the next reboot.  (Permissions are always reevaluated after
each install.)

We also tighten the constraints slightly to prevent two system
apps from fighting over a permission definition; the first system
app to claim the permission wins.

Bug: 17526617
Change-Id: I49686407f5e99322bc511795c653c5d702becd9d
services/core/java/com/android/server/pm/PackageManagerService.java