Fix getActiveApexInfos for ApexManagerFlattenedApex
The for loop in existing code is redundant. It is supposed to filter out some items when generating result. Bug: 161150361 Test: m OVERRIDE_TARGET_FLATTEN_APEX=true Test: atest ApexManagerTest Change-Id: I0ff04b2b500f555ae6e34b9c87b7dc57e3bccaf3
This commit is contained in:
@@ -1023,12 +1023,17 @@ public abstract class ApexManager {
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory() && !file.getName().contains("@")) {
|
||||
boolean skip = false;
|
||||
for (String skipDir : skipDirs) {
|
||||
if (file.getName().equals(skipDir)) {
|
||||
continue;
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
result.add(new ActiveApexInfo(file, Environment.getRootDirectory()));
|
||||
if (!skip) {
|
||||
result.add(
|
||||
new ActiveApexInfo(file, Environment.getRootDirectory()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user