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

Commit d9163a73 authored by Jan Tomljanovic's avatar Jan Tomljanovic
Browse files

Don't show animation on dialog close.

After UX consultation it was concluded that the exit animation should be
prevented.

Flag: LEGACY ENABLE_NEW_PRIVACY_DIALOG ENABLED
Test: atest SystemUITests:com.android.systemui.privacy.PrivacyDialogControllerV2Test
Test: manually tested as well
Bug: 306168530
Change-Id: I33eabfa6e0a0ba090d4342f2305e1d8fe6e02c04
parent b393caaa
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.