summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorWinson <chiuwinson@google.com>2019-08-07 10:51:25 -0700
committerWinson <chiuwinson@google.com>2019-09-26 13:27:17 -0700
commit243e7ea14b32747b3d12b1e83625eddb917c5990 (patch)
treea1e7d5f9521bc8bdb7f809558ccd6b5d04ddc0bd /config
parent4252183449824d77f5c4035e8c12bf504619a5b1 (diff)
Deprecate PackageParser#Package
Replaces PackageParser#Package and it's related structures with ParsingPackage, ParsedPackage, and AndroidPackage. This is a large scoped CL, the first step in an eventual goal to refactor how data is handled in the package parsing and install process. It introduces as few logic changes as necessary. Mostly migrating to interfaces and renaming, moving parsing data calls into 3 separate interfaces that outline the intended flow for parsing. ParsingPackage is built and used during what was PackageParser, now replaced by ApkParseUtils and it's related classes. This is almost exactly what was parsed from the XML/files on disk. ParsedPackage is used when the object exits PackageParser and is adjusted by PackageManagerService to what is considered the final "parsed" state, adjusted from literal values, but consistent given the same APK on disk. This should eventually be moved out of PMS and possibly collapsed into the previous interface entirely. AndroidPackage is the final state of the package after parsing and adjustment has completed and no more mutations should be expected. There are a few exceptions to this, included in AndroidPackageWrite, which will eventually be refactored into PackageSetting or another state class. This marks PackageParser#Package and all the old infrastructure with @Deprecated, as none of them are used internally. All usages were converted, and the legacy Package is only built for un-converted tests and @UnsupportedAppUsage methods. There are numerous TODOs still outstanding, but addressing them in this initial CL would introduce several logic changes. They've been marked with the bug number and will be handled in follow ups. This is being merged with caution thrown to the wind because testing this on devices and in development will be the best way to debug differences introduced by the migration. Getting it merged as early as possible gives the most amount of time to fix regressions. Waiting for tests of all the functionality could take literal years before covering enough to merge this with all regressions verified. Given a sample size of 4 heap dumps and the caveat it was taken very early in the migration, there is a memory overhead of about 200 KB versus the legacy implementation. This should be verified more accurately and addressed in follow ups. This CL also kills child/parent package support, since that's broken already, and difficult to support with the new interface structure. Bug: 135203078 Test: booted an emulator, works generally as expected Specific tests which failed / failed to build were fixed, but because not all tests are currently passing before this change, not all were verified. Change-Id: I4ba050c228e6c60b8f63a9e3347b1f9a57ef794a
Diffstat (limited to 'config')
-rw-r--r--config/preloaded-classes12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/preloaded-classes b/config/preloaded-classes
index 8d911443ce06..5698dfe8a586 100644
--- a/config/preloaded-classes
+++ b/config/preloaded-classes
@@ -877,7 +877,7 @@ android.content.pm.-$$Lambda$jpya2qgMDDEok2GAoKRDqPM5lIE
android.content.pm.ActivityInfo$1
android.content.pm.ActivityInfo$WindowLayout
android.content.pm.ActivityInfo
-android.content.pm.AndroidHidlUpdater
+android.content.pm.parsing.library.AndroidHidlUpdater
android.content.pm.ApplicationInfo$1
android.content.pm.ApplicationInfo
android.content.pm.BaseParceledListSlice
@@ -921,10 +921,10 @@ android.content.pm.LauncherApps$1
android.content.pm.LauncherApps
android.content.pm.ModuleInfo$1
android.content.pm.ModuleInfo
-android.content.pm.OrgApacheHttpLegacyUpdater
-android.content.pm.PackageBackwardCompatibility$AndroidTestRunnerSplitUpdater
-android.content.pm.PackageBackwardCompatibility$RemoveUnnecessaryAndroidTestBaseLibrary
-android.content.pm.PackageBackwardCompatibility
+android.content.pm.parsing.library.OrgApacheHttpLegacyUpdater
+android.content.pm.parsing.library.PackageBackwardCompatibility$AndroidTestRunnerSplitUpdater
+android.content.pm.parsing.library.PackageBackwardCompatibility$RemoveUnnecessaryAndroidTestBaseLibrary
+android.content.pm.parsing.library.PackageBackwardCompatibility
android.content.pm.PackageInfo$1
android.content.pm.PackageInfo
android.content.pm.PackageInstaller$Session
@@ -959,7 +959,7 @@ android.content.pm.PackageParser$SigningDetails$1
android.content.pm.PackageParser$SigningDetails
android.content.pm.PackageParser$SplitNameComparator
android.content.pm.PackageParser
-android.content.pm.PackageSharedLibraryUpdater
+android.content.pm.parsing.library.PackageSharedLibraryUpdater
android.content.pm.PackageStats$1
android.content.pm.PackageStats
android.content.pm.PackageUserState