OSDN Git Service

Use user id 0 to get missing appId for debugger
authorChong Zhang <chz@google.com>
Thu, 9 Jun 2016 23:15:27 +0000 (16:15 -0700)
committerChong Zhang <chz@google.com>
Thu, 9 Jun 2016 23:38:51 +0000 (16:38 -0700)
commitd25944e120aa9029aa6b5cb89f5f08fd95afdbbc
treea981dfd503a13a453e5ef22b5b8d6002019e2b6d
parentc0b602c441337f9597959a02262de525b1793a94
Use user id 0 to get missing appId for debugger

When forceStopPackageLocked is used to kill existing app process for
relaunching with debugger, user id could be -1 and getPackageUid will
already return -1. This results in killPackageProcessesLocked() not
able to find and kill the app, and wait for debugger will.

This also revert commit 55c9d739 (ag/969408) which tried to fix the
same problem but got it wrong. It's valid to -D when the process is
already running, as we're supposed to kill it. The really problem is
that the killing fails because of bad appId.

bug: 28980761
Change-Id: Ibebdcc26865464216a1f4b6773e540921cdad7d2
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java