diff options
| -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); } } |