Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54b97e5 authored by Chelsea Hao's avatar Chelsea Hao Committed by Android (Google) Code Review
Browse files

Merge "Dismiss the dialog manually if controller is null (e.g, when the dialog...

Merge "Dismiss the dialog manually if controller is null (e.g, when the dialog is triggered from search box or the screen is locked)." into main
parents 79733201 10e3a7a3
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -288,11 +288,13 @@ constructor(
    private fun startSettingsActivity(intent: Intent, view: View) {
        if (job?.isActive == true) {
            intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
            activityStarter.postStartActivityDismissingKeyguard(
                intent,
                0,
                dialogTransitionAnimator.createActivityTransitionController(view)
            )
            val controller = dialogTransitionAnimator.createActivityTransitionController(view)
            // The controller will be null when the screen is locked and going to show the
            // primary bouncer. In this case we dismiss the dialog manually.
            if (controller == null) {
                cancelJob()
            }
            activityStarter.postStartActivityDismissingKeyguard(intent, 0, controller)
        }
    }