Allow modules to disable stripping when dexpreopting
Add a no_stripping property and pass it to dexpreopt to disable
stripping for a module.
Bug: 122610462
Test: dexpreopt_test.go
Change-Id: I5a4b005633bb8b1ea373e9eeb420aa0999de17ab
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go
index 8f45303..f316be4 100644
--- a/dexpreopt/dexpreopt.go
+++ b/dexpreopt/dexpreopt.go
@@ -454,6 +454,10 @@
strip = false
}
+ if module.NoStripping {
+ strip = false
+ }
+
// Don't strip modules that are not on the system partition in case the oat/vdex version in system ROM
// doesn't match the one in other partitions. It needs to be able to fall back to the APK for that case.
if !strings.HasPrefix(module.DexLocation, SystemPartition) {