Loading
pm: Fix lock insanity with ActivityManager
* It's possible that ActivityManager may be trying to stop a package while the PackageManager is trying to perform a scan during an upgrade. When AM tries to perform the stop, it will attempt to look up the package user, which will try to take the PM lock. This is fine, but while we're holding the lock in PM during the package upgrade we're attempting to call back into AM to get the current theme, which tries to take the AM lock. This results in the entire system locking up until watchdog kills off system server. * Instead of looking up the current theme while holding the lock in PM, look it up before locking the whole place down. Change-Id: If322a7f214218740d73043ff65860ccadd92f01d