OSDN Git Service

Use KNOWN_PACKAGES when shared lib consumers
authorPatrick Baumann <patb@google.com>
Thu, 10 Oct 2019 22:50:28 +0000 (15:50 -0700)
committerBryan Ferris <bferris@google.com>
Wed, 8 Jan 2020 22:45:56 +0000 (22:45 +0000)
commit08315953bc42fb392c32293418dfb2a3e4ffbe53
tree068406a3086a2d86aad21136cd2144f02ee17326
parent6afabce549f5725988b9c03de932c34e9d22f10e
Use KNOWN_PACKAGES when shared lib consumers

This change ensures we find ALL known packages that could be consuming a
shared library, not only currently installed ones. Without this check,
the system may get into a state in which we have currently uninstalled
but on-device apps that depend on a shared library that does not exist
on device.

This change also leaves static shared library packages on device even if
it's not installed for any of the remaining users as it could still be
used, but marked uninstalled for users in which it is consumed.

Bug: 141413692
Bug: 142083996
Test: Manual; attempt to remove shared lib after marking its consumer uninstalled.
Test: atest StaticSharedLibsHostTests
Change-Id: Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea
Merged-In: Id4e37c3e4d3ea3ad5fddae5d2c7305e56f50eeea
services/core/java/com/android/server/pm/PackageManagerService.java