am e0e5790: AI 148153: CTS: Strip control characters from failure string
Merge commit 'e0e579051414248e1b74fbfe5029d07b7edcd456' into donut
* commit 'e0e579051414248e1b74fbfe5029d07b7edcd456':
AI 148153: CTS: Strip control characters from failure strings before converting to XML
diff --git a/tools/host/src/com/android/cts/HostConfig.java b/tools/host/src/com/android/cts/HostConfig.java
index 11f7488..aeeae96 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();
}
}