Allow for multiple preferred densities in the strip command.

Test: Unit tests pass.

Change-Id: I1f27ac8c36ff3489e4c8e4fce7f3d9cb31df6906
diff --git a/tools/aapt2/link/Link.cpp b/tools/aapt2/link/Link.cpp
index f7e0f8f..0501a3b 100644
--- a/tools/aapt2/link/Link.cpp
+++ b/tools/aapt2/link/Link.cpp
@@ -1634,7 +1634,7 @@
 
     if (options_.static_lib) {
       if (options_.table_splitter_options.config_filter != nullptr ||
-          options_.table_splitter_options.preferred_density) {
+          !options_.table_splitter_options.preferred_densities.empty()) {
         context_->GetDiagnostics()
             ->Warn(DiagMessage()
                    << "can't strip resources when building static library");
@@ -2107,8 +2107,7 @@
                         << "Preferred density must only be a density value");
       return 1;
     }
-    options.table_splitter_options.preferred_density =
-        preferred_density_config.density;
+    options.table_splitter_options.preferred_densities.push_back(preferred_density_config.density);
   }
 
   if (!options.static_lib && stable_id_file_path) {