Merge "Use SysuiTestCase#runShellCommand." into tm-qpr-dev
diff --git a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsImeTest.java b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsImeTest.java
index d418836..7f55d38 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsImeTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsImeTest.java
@@ -49,6 +49,7 @@
import org.junit.Rule;
import org.junit.Test;
+import java.io.IOException;
import java.util.concurrent.TimeUnit;
import java.util.function.BooleanSupplier;
@@ -148,8 +149,12 @@
return false;
}
- private static void executeShellCommand(String cmd) {
- InstrumentationRegistry.getInstrumentation().getUiAutomation().executeShellCommand(cmd);
+ private void executeShellCommand(String cmd) {
+ try {
+ runShellCommand(cmd);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
/**