OSDN Git Service

Handle renamed packages during default grants
authorSvet Ganov <svetoslavganov@google.com>
Tue, 17 Nov 2015 19:53:18 +0000 (11:53 -0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Jul 2016 09:53:30 +0000 (17:53 +0800)
commit7f01f43d1802f1bba1f8549b4820b4020ceea395
treead34df44da9949e0bd9ad8313f88d0e8d2bbd5be
parenteaafcb1b38491415aaeb8319014705419c821817
Handle renamed packages during default grants

If an L device has a privileged app on the system image which was
updated and an M OTA renames the app package (supported only for
privileged apps) we end up with a disabled system package setting
with no package information. Since we are not doing a null check
of the package we get from the disabled package settings during
default grants we crash leaving the system in a bad state.

bug:25687380
Change-Id: I4f2ebcaf471e4bd1696298eab4716b50c52ca5c4
(cherry picked from commit f443384d9e30111aaa61dac75af1f40d19465e96)
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-26630
Reviewed-on: https://android.intel.com:443/486841
services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java