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)
committerThe Android Automerger <android-build@google.com>
Fri, 27 Mar 2015 22:02:04 +0000 (15:02 -0700)
commitac9da77f6348ca5b0b6d2303f0cbffedd04ab9bc
tree2fd5487d05f9023e4cb90fd239667b522af43569
parent32dcf5684c2754ff392693daa81e55f3ca6a1ff9
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