From a8bfabed31a765d18900b9115355bdb876ce5f58 Mon Sep 17 00:00:00 2001 From: Yurii Zubrytskyi Date: Wed, 10 Jul 2024 12:25:24 -0700 Subject: [aapt2] Add --enable-compact-entries to optimize The optimize command should have the same switches as convert and link, so adding the missing one here Test: build Flag: EXEMPT minor change Change-Id: I9e5f3d7fb65db97a14fc952c30407d594057c5bc --- tools/aapt2/cmd/Optimize.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/aapt2/cmd/Optimize.h b/tools/aapt2/cmd/Optimize.h index ee53af107b17..012b0f230ca2 100644 --- a/tools/aapt2/cmd/Optimize.h +++ b/tools/aapt2/cmd/Optimize.h @@ -116,6 +116,10 @@ class OptimizeCommand : public Command { "This decreases APK size at the cost of resource retrieval performance.\n" "Applies sparse encoding to all resources regardless of minSdk.", &options_.force_sparse_encoding); + AddOptionalSwitch( + "--enable-compact-entries", + "This decreases APK size by using compact resource entries for simple data types.", + &options_.table_flattener_options.use_compact_entries); AddOptionalSwitch("--collapse-resource-names", "Collapses resource names to a single value in the key string pool. Resources can \n" "be exempted using the \"no_collapse\" directive in a file specified by " -- cgit v1.2.3-59-g8ed1b