diff options
author | Winson <chiuwinson@google.com> | 2019-03-07 12:54:24 -0800 |
---|---|---|
committer | Winson Chiu <chiuwinson@google.com> | 2019-04-10 19:00:35 +0000 |
commit | 7a3d82a58198944bfa9d56709b3ee077e545743c (patch) | |
tree | 3a44f4cd55edfd6a55be819516b096efebd484f6 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 329a9b0b6fa7bc7e8bdba1c70a6887205f4c51b8 (diff) |
Close ApkAssets in PackageParser
Immediately closes ApkAssets to free up some memory during package
parsing/install process.
This is used instead of implementing AutoCloseable because of
complexities with AssetManager and tracking assets opened
outside of the ApkAssets.java class.
Explained more in b/72056911.
Test: manually booted emulator; closing ApkAssets is used at
boot in PackageParser#parseApkLiteInner
Test: adb install test.apk && sleep 5 && adb uninstall test.package
&& sleep 1 && (adb shell lsof | grep "test.package") prints no
system_server references
Bug: 130182148
Change-Id: Ia471d7065e65bd39b535309de6c6da7ec35bdf12
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions