Refactor testDisableKeyguard_thenSettingCredential_reenablesKeyguard
test to check Device secured/locked status after setting credentials
instead of checking for the visibility of Keyguard.

testDisableKeyguard_thenSettingCredential_reenablesKeyguard was flaky
when we were checking for the keyguard visibility status after setting
credentials. Checking for the secured/locked status is both reliable and
valid (the test fails if we don't set credentials.)

Bug: 154829257
Test: atest CtsWindowManagerDeviceTestCases:KeyguardLockedTests
Change-Id: I085b12081497f1e8d2322c94ed9999af63f70d17
3 files changed