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

Commit 7d1ddd7e authored by JW Wang's avatar JW Wang Committed by Automerger Merge Worker
Browse files

Merge "findNetworkStackApk returns an array of files (2/n)" into rvc-dev am:...

Merge "findNetworkStackApk returns an array of files (2/n)" into rvc-dev am: bba5d59a am: 89a6147d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004938

Change-Id: I27d69159cdf3137a8b2e9ccb0f0b09bccc0109d5
parents f3d73b40 89a6147d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -61,11 +61,12 @@ public class NetworkStagedRollbackTest {
    private static final TestApp NETWORK_STACK = new TestApp("NetworkStack",
            getNetworkStackPackageName(), -1, false, findNetworkStackApk());

    private static File findNetworkStackApk() {
    private static File[] findNetworkStackApk() {
        for (String name : NETWORK_STACK_APK_NAMES) {
            final File apk = new File("/system/priv-app/" + name + "/" + name + ".apk");
            if (apk.isFile()) {
                return apk;
                final File dir = new File("/system/priv-app/" + name);
                return dir.listFiles((d, f) -> f.startsWith(name));
            }
        }
        throw new RuntimeException("Can't find NetworkStackApk");