diff options
| author | 2019-10-24 14:21:35 +0000 | |
|---|---|---|
| committer | 2019-10-24 14:21:35 +0000 | |
| commit | fd51bd75ecec0931ec9ee896313c1000bffa03df (patch) | |
| tree | 279150154f3a746b6a0b12408f793a3fe9611dc2 | |
| parent | f78f8d7effe6d8deac47f94f81ce90a7beac367f (diff) | |
| parent | 9ba5f6b80ae400a9a0d85c6cbf7a54516bc3f70d (diff) | |
Merge "Close the returned file descriptior (1/n)"
| -rw-r--r-- | tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java index 79b8b4623cd8..b17a1d987ac9 100644 --- a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java +++ b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java @@ -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); } } |