am f45420d0: am 565b6b41: Merge "Update platform.dir search in tests." into lmp-mr1-dev automerge: 7e39385
* commit 'f45420d0bd912de3da9506bbae12a0e4b789bd84': Update platform.dir search in tests.
This commit is contained in:
@@ -165,11 +165,27 @@ public class Main {
|
||||
if (!out.isDirectory()) {
|
||||
return null;
|
||||
}
|
||||
File sdkDir = new File(out, "sdk" + File.separator + "sdk");
|
||||
File sdkDir = new File(out, "sdk");
|
||||
if (!sdkDir.isDirectory()) {
|
||||
// The directory we thought that should contain the sdk is not a directory.
|
||||
return null;
|
||||
}
|
||||
File[] sdkDirs = sdkDir.listFiles(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File path) {
|
||||
// We need to search for $TARGET_PRODUCT (usually, sdk_phone_armv7)
|
||||
return path.isDirectory() && path.getName().startsWith("sdk");
|
||||
}
|
||||
});
|
||||
for (File dir : sdkDirs) {
|
||||
String platformDir = getPlatformDirFromHostOutSdkSdk(dir);
|
||||
if (platformDir != null) {
|
||||
return platformDir;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getPlatformDirFromHostOutSdkSdk(File sdkDir) {
|
||||
File[] possibleSdks = sdkDir.listFiles(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File path) {
|
||||
|
||||
Reference in New Issue
Block a user