Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c5e17b8 authored by Deepanshu Gupta's avatar Deepanshu Gupta Committed by Android Git Automerger
Browse files

am b66fe7bf: am d45867a4: Merge "Update platformDir search in tests." into mnc-dev

* commit 'b66fe7bf':
  Update platformDir search in tests.
parents 83fe387b b66fe7bf
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -124,9 +124,14 @@ public class Main {
        if (platformDir != null) {
            return platformDir;
        }
        // Test if workingDir is  platform/frameworks/base/tools/layoutlib. That is, root should be
        // workingDir/../../../../  (4 levels up)

        // Test if workingDir is platform/frameworks/base/tools/layoutlib/bridge.
        File currentDir = workingDir;
        if (currentDir.getName().equalsIgnoreCase("bridge")) {
            currentDir = currentDir.getParentFile();
        }
        // Test if currentDir is  platform/frameworks/base/tools/layoutlib. That is, root should be
        // workingDir/../../../../  (4 levels up)
        for (int i = 0; i < 4; i++) {
            if (currentDir != null) {
                currentDir = currentDir.getParentFile();