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

Commit e23162f5 authored by Jan Tomljanovic's avatar Jan Tomljanovic Committed by Android (Google) Code Review
Browse files

Merge "Don't show animation on dialog close." into main

parents ba82e0ed d9163a73
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -278,7 +278,12 @@ class PrivacyDialogControllerV2(
                    d.setShowForAllUsers(true)
                    d.addOnDismissListener(onDialogDismissed)
                    if (view != null) {
                        dialogLaunchAnimator.showFromView(d, view)
                        val controller = getPrivacyDialogController(view)
                        if (controller == null) {
                            d.show()
                        } else {
                            dialogLaunchAnimator.show(d, controller)
                        }
                    } else {
                        d.show()
                    }
@@ -291,6 +296,13 @@ class PrivacyDialogControllerV2(
        }
    }

    private fun getPrivacyDialogController(source: View): DialogLaunchAnimator.Controller? {
        val delegate = DialogLaunchAnimator.Controller.fromView(source) ?: return null
        return object : DialogLaunchAnimator.Controller by delegate {
            override fun shouldAnimateExit() = false
        }
    }

    /** Dismisses the dialog */
    fun dismissDialog() {
        dialog?.dismiss()
+203 −207

File changed.

Preview size limit exceeded, changes collapsed.