Temporarily disable optimization for the terminal app
With optmizations, some kotlin runtime classes or methods that are not
used by the app are pruned. That will however break instrumentation
tests if the test or its dependencies (androidx, ...) depend on the
pruned clases or methods. The test has those classes in its apk, but due
to the classloader precedence, the class from the terminal app (which is
pruned) is loaded.
To solve this, temporarily disable optimizations. In the future, we will
either have to fine tune the keep rules, or apply the optimization only
for production builds.
Bug: 375051310
Test: N/A
Change-Id: Ic5842c37ae04ce4f4ebffab9393a3eb7fd539fb7
diff --git a/android/TerminalApp/Android.bp b/android/TerminalApp/Android.bp
index 09287d8..bf93226 100644
--- a/android/TerminalApp/Android.bp
+++ b/android/TerminalApp/Android.bp
@@ -24,9 +24,7 @@
platform_apis: true,
privileged: true,
optimize: {
- optimize: true,
- proguard_flags_files: ["proguard.flags"],
- shrink_resources: true,
+ enabled: false,
},
apex_available: [
"com.android.virt",