OSDN Git Service

When scanning unbundled apps, only install the expected APK tree
authorChristopher Tate <ctate@google.com>
Thu, 26 Mar 2015 22:38:29 +0000 (15:38 -0700)
committerChristopher Tate <ctate@google.com>
Thu, 26 Mar 2015 22:55:30 +0000 (15:55 -0700)
commitdbe0dd160e93feef1335830a36e86ae83b19b793
treeb3c5d0446b123bb56eff23b0501702a5d70e5270
parent9a91bf1d18d3855b4bdaaa613fa10372da6e530e
When scanning unbundled apps, only install the expected APK tree

We now make sure, when scanning post-factory app installs, that we do not
accidentally activate a "leaked" or otherwise superfluous APK tree that the
scan algorithm happens to encounter before the one that we expect a priori
based on the persisted package-installation state.  When we find such an
extraneous installation we ignore it in favor of the expected one, similarly
to the policy used when collecting system-bundled packages that have been
updated.

Even if we find an unexpected APK for the package, if the expected one
turns out to be absent we fall back to the existing "we thought this app
was present and now it isn't" logic.

Bug 19602471

Change-Id: I141a93661946176c05d8cf52a123bdf75c8eef74
services/core/java/com/android/server/pm/PackageManagerService.java