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 Chiu <chiuwinson@google.com>
Tue, 9 Apr 2019 22:18:17 +0000 (22:18 +0000)
commitc6778e5435f0bea1737fd987af3f4480ac3ab2d1
tree794798c6dbef41e28a51e0f1a223ecb5724573e8
parentaacec3d11137411b6485f8c2b0a52c47498d73c1
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
(cherry picked from commit 588784dc259c23782db6a6c93054056fca1dbd77)
core/java/android/content/pm/PackageParser.java
services/core/java/com/android/server/pm/PackageManagerService.java