OSDN Git Service

Remove overlay logic from package manager and parser
authorMårten Kongstad <marten.kongstad@sony.com>
Thu, 6 Dec 2018 12:40:12 +0000 (13:40 +0100)
committerWinson <chiuwinson@google.com>
Thu, 4 Apr 2019 18:10:59 +0000 (11:10 -0700)
commit588784dc259c23782db6a6c93054056fca1dbd77
tree968deb44f6766aec09d8cdc032da42974274e070
parent3841ec1593beb4478f4cc04b7698275c9534e926
Remove overlay logic from package manager and parser

Consolidate all knowledge about overlays to the overlay manager (except
static RROs that target "android": these are handled from native code in
order to be loaded as part of Zygote boot).

This removes the ability to overlay AndroidManifest.xml. There are some
use-cases where overlaying a manifest makes sense [e.g. changing an
app's label or icon or what components should be enabled by default] but
the opposite is also true [e.g. permissions]. Support for manifests can
be introduced again gradually with these goals in mind:

  - should not happen during parsing [which represents the immutable
    truth as read from disk]

  - should happen during scanning [which applies mutable settings to a
    parsed package]

  - be limited in what can be modified

Bug: 78808368
Test: builds, boots
Change-Id: I12c16fce65b1e68876f0c9acd7e2a61405e64435
core/java/android/content/pm/PackageParser.java
services/core/java/com/android/server/pm/PackageManagerService.java