Merge "Wake up/unlock device before running tests"
diff --git a/tests/unit/src/com/android/settings/core/LifecycleEventHandlingTest.java b/tests/unit/src/com/android/settings/core/LifecycleEventHandlingTest.java
index e601171..57d5662 100644
--- a/tests/unit/src/com/android/settings/core/LifecycleEventHandlingTest.java
+++ b/tests/unit/src/com/android/settings/core/LifecycleEventHandlingTest.java
@@ -50,8 +50,10 @@
     private UiDevice mDevice;
 
     @Before
-    public void setUp() {
+    public void setUp() throws Exception {
         mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
+        mDevice.wakeUp();
+        mDevice.executeShellCommand("wm dismiss-keyguard");
         mContext = InstrumentationRegistry.getTargetContext();
         mTargetPackage = mContext.getPackageName();
     }