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

Commit 608087aa authored by Shan Huang's avatar Shan Huang
Browse files

Fix a bug that ripple might get readded to WM and cause crash.

Bug: 184868310
Test: SystemUITests
Test: Manually
Change-Id: Idfd7d25ee60065ef3b2d9b48a35b5a8c570fc945
parent 279a38e1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -103,7 +103,10 @@ class WiredChargingRippleController @Inject constructor(
    }

    fun startRipple() {
        if (rippleView.rippleInProgress) {
        if (rippleView.rippleInProgress || rippleView.parent != null) {
            // Skip if ripple is still playing, or not playing but already added the parent
            // (which might happen just before the animation starts or right after
            // the animation ends.)
            return
        }
        val mWM = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager