am 57fd770: AI 148328: CTS: Fix premature end of session when disabling
Merge commit '57fd7702a412ad10fbae061368c4cc3ea9e72f2a' into donut
* commit '57fd7702a412ad10fbae061368c4cc3ea9e72f2a':
AI 148328: CTS: Fix premature end of session when disabling device restarts
diff --git a/tools/host/src/com/android/cts/HostConfig.java b/tools/host/src/com/android/cts/HostConfig.java
index ba09f5b..543ee6a 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 ResultRepository mResultRepos;
private PlanRepository mPlanRepos;
-
- // key: app package name
- // value: TestPackage
private HashMap<String, TestPackage> mTestPackageMap;
enum Ints {
@@ -265,9 +262,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();
}
}