Dismiss keyguard when opening settings

Previously, the app would throw the user back to the
lockscreen, which would require user to swipe up to dismiss
it and unlock (e.g. enter PIN), then open the settings
activity.
Fix this confusion by directly trying to dismiss keyguard.

Pass through requestDismissKeyguard() from KeyguardManager
so that other activities may also use it.

Test: Set lock via PIN, launch camera via secure intent
      (e.g. via right KeyguardAffordance), tap settings
      button, observe PIN request, enter PIN, land in
      settings activity.
Test: When unlocking, dismiss PIN entry, observe
      "Keyguard dismiss canceled" in logcat.

Signed-off-by: Felix <google@ix5.org>
Change-Id: I9e1e2a8551f7b2230c59d04efd3ef9820f74e1c8
2 files changed