DO NOT MERGE: Check if keyguard is locked before dismiss operation

If keygard is already unlocked, dismiss operation which rely on keycode
event will start search activity and this will block test activity.

Bug: 112123616
Test: android.appsecurity.cts.DirectBootHostTest#testDirectBootEmulated
      android.appsecurity.cts.DirectBootHostTest#testDirectBootNone

Change-Id: If1e90d36017329ee706e55b660c97d2bd8595d98
Signed-off-by: liyong <liyong@allwinnertech.com>
(cherry picked from commit 642c9590321f099026aab5fc798f49f1e47620f6)
1 file changed