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

Commit fd51bd75 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Close the returned file descriptior (1/n)"

parents f78f8d7e 9ba5f6b8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageInstaller;
import android.content.rollback.RollbackInfo;
import android.content.rollback.RollbackManager;
import android.os.ParcelFileDescriptor;
import android.provider.DeviceConfig;
import android.text.TextUtils;

@@ -46,6 +47,8 @@ import com.android.cts.rollback.lib.Rollback;
import com.android.cts.rollback.lib.RollbackUtils;
import com.android.internal.R;

import libcore.io.IoUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -332,7 +335,8 @@ public class StagedRollbackTest {
    }

    private void runShellCommand(String cmd) {
        InstrumentationRegistry.getInstrumentation().getUiAutomation()
        ParcelFileDescriptor pfd = InstrumentationRegistry.getInstrumentation().getUiAutomation()
                .executeShellCommand(cmd);
        IoUtils.closeQuietly(pfd);
    }
}