summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Winson <chiuwinson@google.com> 2022-08-30 09:45:56 -0700
committer Winson <chiuwinson@google.com> 2022-08-30 12:27:27 -0700
commit326e7338d3885f19b6abfb7aa8766b4ca612a47b (patch)
tree9716194616e30bfc37fdcd4fa322202184711cb4 /libs/androidfw/StringPool.cpp
parent1321dbed381edda7590b8b42dac8339e410d0df8 (diff)
Move nested package dir checking to PackageParser2
As part of Ib05b187dc006272603709a95534c40744cd62f0c, /data/app APKs were nested one directory further down. This makes the cacher and parsing disagree on the actual file path representing a package. The AndroidPackage and thus public API representation remained correct by using the immediate parent folder containing the APKs, usually /data/app/~~random/packageName-random. But because PMS doesn't search its scan directories any further than the first directory level, when it scanned /data/app, it would submit /data/app/~~random, one parent level higher than previous pre-R platform levels expected. Unfortunately since this behavior is now handled by the system gracefully, it's hard to migrate back and enforce that the right dir is passed to PackageParser2, as several system components call into it. Instead, this moves the deeper child check up from the parsing internals to PackageParser2#parsePackage, which will transform its input packageFile to the deeper level as necessary, which preserves the internal parsing API behavior while also ensuring that any deeper parsing infrastucture works on a single equivalent path to represent a package. Bug: 243912163 Bug: 242639590 Test: presubmit Change-Id: I089b915a7751407dbe456a32b0c6eae315d193f5
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions