Don't call onModalnessUpdated if modalness stays the same

- Repeatedly calling onModalnessUpdated results in repeated calls of View.setAlpha, which caused regression in Overview loading time

Fix: 341266234
Test: android.platform.test.scenario.messenger.OpenAppFromQuickStepAndOpenQuickStepMicrobenchmark#testOpenQuickStepAndOpenApp
Flag: EXEMPT bugfix
Change-Id: Id756e80f20afafee2bb45e6a3ab861d83ab0b674
This commit is contained in:
Alex Chau
2024-05-22 16:04:58 +01:00
parent 656f0e8d13
commit 04b355a2d9

View File

@@ -257,6 +257,9 @@ constructor(
*/
protected var modalness = 0f
set(value) {
if (field == value) {
return
}
field = value
onModalnessUpdated(field)
}