summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2016-10-25 20:47:15 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2016-10-26 18:14:06 +0000
commite2c85890ac3941525288e08962b33d30618de801 (patch)
treea1263ee2943ff1e060b8a2f5d1772f6ba330d8f0 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9cac4568e50687e9c0f85dedb2d9ee6a36bd0ff8 (diff)
[DO NOT MERGE] Don't accidentally delete renamed packages
Apps on the system image can change their package by declaring their old one in the manifest. If a package is renamed it is internally referred by its old name. The reconciliation code was using the new package name for renamed packages and was concluding the apk is orphaned thus deleting it. This puts the package in a bad state where the app is gone and the version on the system partition is disabled. Also Play was showing an update for a renamed system app as an install while it is an update because of the same reason, it was using the new package name while the app is internally referred by the old one. The fix for both above is to internally normalize the package name by using the old one if the package was renamed or the package name as is. Test: With the fix put the old calculator on the system image and booted, then put the renamed calculator and booted, updated calculator from play and rebooted - calculator keeps working. Also did the above steps without the patch to put calculator in a bad state and flashed the system with the patch which fixed the broken calculator app. bug:32321269 Change-Id: I98bfc05c399edfc9854ebcce44182fefa55ceeff
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions