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

Commit 003c18de authored by JW Wang's avatar JW Wang Committed by Automerger Merge Worker
Browse files

Merge "Search more NetworkStack paths" into rvc-dev am: 3bd90df5

Change-Id: I5bccc230a6b976775a860e9529201cdd4f786093
parents 012e5739 3bd90df5
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -52,15 +52,21 @@ public class NetworkStagedRollbackTest {
    private static final String PROPERTY_WATCHDOG_REQUEST_TIMEOUT_MILLIS =
            "watchdog_request_timeout_millis";

    private static final String[] NETWORK_STACK_APK_NAMES = {
            "NetworkStack", "NetworkStackGoogle", "NetworkStackNext", "NetworkStackNextGoogle"
    };

    private static final TestApp NETWORK_STACK = new TestApp("NetworkStack",
            getNetworkStackPackageName(), -1, false, findNetworkStackApk());

    private static File findNetworkStackApk() {
        final File apk = new File("/system/priv-app/NetworkStack/NetworkStack.apk");
        for (String name : NETWORK_STACK_APK_NAMES) {
            final File apk = new File("/system/priv-app/" + name + "/" + name + ".apk");
            if (apk.isFile()) {
                return apk;
            }
        return new File("/system/priv-app/NetworkStackNext/NetworkStackNext.apk");
        }
        throw new RuntimeException("Can't find NetworkStackApk");
    }

    /**