diff options
author | Robin Lee <rgl@google.com> | 2020-08-18 18:44:11 +0200 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2020-08-18 17:28:23 +0000 |
commit | 6b93c8a98a65b2dd5d6220209b3a00e6e2f88bb6 (patch) | |
tree | a0e16ea68041513d54043ef913cc9a9163aaef4b /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 3623577c19724f659d6e2e585b4941d757dcc1cb (diff) |
Fix appId to killApplication when hiding packages
This function takes either an appId (for all users) or appId + userId
(for force stopping an app in a single user). Passing a secondary UID
in the appId slot has some really bad consequences:
- Framework will decide to try and force stop all packages matching this
UID including killing all of the services
- ActivityManagerService will successfully turn up a ServiceRecord for
each instance that needs to be killed, and mark it for removal.
- However the ServiceRecord will not match to a process and will not be
killed.
Next time we try to start a service, the process will still be running
and will be reused as one would expect.
This leads to zombie instances of all the Service objects in a class
that continue to run, alongside any new instances that get created right
after as a result of the framework thinking it killed these services and
needs to restart them.
Test: Manual: create a managed profile containing AtvRemoteService (app with foreground service), confirm framework hid it in user10, check logs and heap dump to confirm it's no longer running twice.
Bug: 160932561
Change-Id: I5d5b2360ea0d72ca9a5c39eb6e8c0ca6a7f33540
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions