OSDN Git Service

Kick movement preconditions onto handler thread.
authorJeff Sharkey <jsharkey@android.com>
Thu, 5 Nov 2015 18:00:05 +0000 (10:00 -0800)
committerJeff Sharkey <jsharkey@android.com>
Thu, 5 Nov 2015 18:28:43 +0000 (10:28 -0800)
commitf131e1aae9c04d58a6ac0c51555ed90ea4158d6e
tree8fb893552f61928bda03f6f352f0b18c14ad636d
parentc8bb39d98d7c2a07f1a5c745f6e89e379e4a25f0
Kick movement preconditions onto handler thread.

The bulk of package moving already occurs on the handler thread,
but one of the precondition steps requires that we make an installd
call to calculate disk space of the app.  If there was already
another long-running installd call going on, we could end up ANR'ing
the caller.

Since movePackage() is already designed to return a moveId and go
async, we can push all the precondition steps onto the handler thread
to prevent the ANR.

Bug: 25490003
Change-Id: I62d555c23bbf81b791f6f4cabc40c3d64c580cf8
services/core/java/com/android/server/pm/PackageManagerService.java