Device Controls - Supporting activity launch

Make sure to dismiss the keyguard prior to launching supporting
activities. Otherwise the keyguard will remain and leave the user in
a loop of trying to add/edit controls without the means to do so.

Fixes: 199882607
Test: manual - swipe security, attempt to "Add Controls" from lockscreen
Change-Id: Ic157d91004af68b191a62124726bfdbb54ca9ac9
This commit is contained in:
Matt Pietal
2021-09-14 11:14:15 -04:00
parent b60eafbd4a
commit 1cc179211f

View File

@@ -256,13 +256,13 @@ class ControlsUiControllerImpl @Inject constructor (
// Force animations when transitioning from a dialog to an activity
intent.putExtra(ControlsUiController.EXTRA_ANIMATE, true)
if (keyguardStateController.isUnlocked()) {
if (keyguardStateController.isShowing()) {
activityStarter.postStartActivityDismissingKeyguard(intent, 0 /* delay */)
} else {
activityContext.startActivity(
intent,
ActivityOptions.makeSceneTransitionAnimation(activityContext as Activity).toBundle()
)
} else {
activityStarter.postStartActivityDismissingKeyguard(intent, 0 /* delay */)
}
}