diff options
| author | 2024-09-09 13:57:17 -0400 | |
|---|---|---|
| committer | 2024-09-09 14:11:21 -0400 | |
| commit | a9b535f8a9f9cb46861585168543bb67660a6d1d (patch) | |
| tree | c8e2d856d06d385442dd5271667141f4362c28f0 /libs/input/PointerController.cpp | |
| parent | af00cc737b632e572620096fc15898409d3929f9 (diff) | |
Fix inconsistent behavior of killPackageDependents.
ActivityManagerService.killPackageDependents behaved inconsistently when
used with USER_ALL vs a specific user id. In both cases, processes that
have added a dependency on the specified package via
addPackageDependency were killed as expected, but processes owned by the
specified package were only being killed when a specific user id was
used, and were left alone when USER_ALL was specified.
Fix this by looping over all the users as other similar process-killing
methods do, instead of relying on a single call to
killPackageProcessesLSP.
This also adds proper usage of UserController.handleIncomingUser, making
it possible to use the API with USER_CURRENT. Killing dependents for all
users now requires INTERACT_ACROSS_USERS_FULL to be consistent with
other similar APIs - previously no permission other than KILL_UID was
required.
Bug: 310653407
Test: atest CtsAppTestCases:PackageDependencyTest
Flag: EXEMPT bugfix
Change-Id: I7a95758bab4fa2c8b33d5c6748a614848c9d8d9a
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions