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)
committerThe Android Automerger <android-build@google.com>
Fri, 6 Nov 2015 01:35:27 +0000 (17:35 -0800)
commit14083582a3fd306ce28ab2be46d61cd4d299b01c
tree31b49012bc9e180d805c4aebcb3287f36112396b
parentd028ee75c5675e38ae71b7aeb32fe10637af1a98
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