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

Commit e9c77b8a authored by Beverly's avatar Beverly
Browse files

Only update udfps view params if addViewRunnable IS null

When addViewRunnable is null, this means there's no pending view.
Previously we were checking for the exact opposite by mistake.

Fixes: 333180884
Flag: ACONFIG com.android.systemui.udfps_view_performance NEXTFOOD
Flag: ACONFIG com.android.systemui.device_entry_udfps_refactor TRUNKFOOD
Test: atest UdfpsControllerOverlayTest
Change-Id: I2441e5840878c852f7519fc47bd620f692e4aa93
parent 2adb2e4f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ class UdfpsControllerOverlayTest : SysuiTestCase() {
                // THEN the view layout is never updated
                verify(windowManager, never()).updateViewLayout(any(), any())

                // CLEANUPL we hide to end the job that listens for the finishedGoingToSleep signal
                // CLEANUP we hide to end the job that listens for the finishedGoingToSleep signal
                controllerOverlay.hide()
            }
        }
@@ -595,7 +595,7 @@ class UdfpsControllerOverlayTest : SysuiTestCase() {
                controllerOverlay.updateOverlayParams(overlayParams)

                // THEN the view layout is updated
                verify(windowManager, never()).updateViewLayout(any(), any())
                verify(windowManager).updateViewLayout(any(), any())
            }
        }
}
+1 −1
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
        overlayParams = updatedOverlayParams
        sensorBounds = updatedOverlayParams.sensorBounds
        getTouchOverlay()?.let {
            if (addViewRunnable != null) {
            if (addViewRunnable == null) {
                // Only updateViewLayout if there's no pending view to add to WM.
                // If there is a pending view, that means the view hasn't been added yet so there's
                // no need to update any layouts. Instead the correct params will be used when the