am a0ec0db: AI 147957: CTS: Add configuration variable to set max size f

Merge commit 'a0ec0db9ab29f1bee1abb2e4ed7e058cc65fb051' into donut

* commit 'a0ec0db9ab29f1bee1abb2e4ed7e058cc65fb051':
  AI 147957: CTS: Add configuration variable to set max size for a package to be run in batch mode
diff --git a/tools/host/src/com/android/cts/HostConfig.java b/tools/host/src/com/android/cts/HostConfig.java
index 842190f..4db1fe9 100644
--- a/tools/host/src/com/android/cts/HostConfig.java
+++ b/tools/host/src/com/android/cts/HostConfig.java
@@ -66,9 +66,6 @@
     private CaseRepository mCaseRepos;
     private Repository mResultRepos;
     private PlanRepository mPlanRepos;
-
-    // key: app package name
-    // value: TestPackage
     private HashMap<String, TestPackage> mTestPackageMap;
     
     enum Ints {
@@ -253,9 +250,9 @@
      * @return The binary name of the package.
      */
     public String getPackageBinaryName(String appPackageName) {
-
         for (TestPackage pkg : mTestPackageMap.values()) {
-            if (appPackageName.equals(pkg.getAppPackageName())) {
+            if ((appPackageName.startsWith(pkg.getAppPackageName()))
+                    || (appPackageName.equals(pkg.getAppBinaryName()))) {
                 return pkg.getAppBinaryName();
             }
         }