AAPT2: Expose split support to command line

Bug:30445078
Change-Id: If4b8530dba71b9059b8e62c04757da99c1119d22
diff --git a/tools/aapt2/split/TableSplitter.cpp b/tools/aapt2/split/TableSplitter.cpp
index 2dfe2a2..08b9ee9 100644
--- a/tools/aapt2/split/TableSplitter.cpp
+++ b/tools/aapt2/split/TableSplitter.cpp
@@ -17,6 +17,7 @@
 #include "ConfigDescription.h"
 #include "ResourceTable.h"
 #include "split/TableSplitter.h"
+#include "util/Util.h"
 
 #include <algorithm>
 #include <map>
@@ -76,7 +77,6 @@
             // in multiple splits.
             const ConfigDescription& config = entry.first;
             const std::vector<ResourceConfigValue*>& relatedValues = entry.second;
-
             auto densityValueIter = mDensityDependentConfigToDensityMap.find(config);
             if (densityValueIter != mDensityDependentConfigToDensityMap.end()) {
                 // Select the best one!
@@ -89,12 +89,12 @@
                             thisValue->config.isBetterThan(bestValue->config, &targetDensity)) {
                         bestValue = thisValue;
                     }
-
-                    // When we select one of these, they are all claimed such that the base
-                    // doesn't include any anymore.
-                    (*claimedValues)[thisValue] = true;
                 }
                 assert(bestValue);
+
+                // When we select one of these, they are all claimed such that the base
+                // doesn't include any anymore.
+                (*claimedValues)[bestValue] = true;
                 selected.push_back(bestValue);
             }
         }
@@ -135,7 +135,6 @@
         assert(bestValue);
     }
 }
-
 bool TableSplitter::verifySplitConstraints(IAaptContext* context) {
     bool error = false;
     for (size_t i = 0; i < mSplitConstraints.size(); i++) {