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
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.kt b/quickstep/src/com/android/quickstep/views/TaskView.kt
index 1490fd0..05b9d40 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.kt
+++ b/quickstep/src/com/android/quickstep/views/TaskView.kt
@@ -257,6 +257,9 @@
*/
protected var modalness = 0f
set(value) {
+ if (field == value) {
+ return
+ }
field = value
onModalnessUpdated(field)
}