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

Commit 8473e1d7 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 am: 003c18de

Change-Id: Ia8ca698660d6cc7e9f429f9860ac8fd9980325cb
parents 4ca169f9 003c18de
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");
    }

    /**