summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipKeepClearAlgorithm.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipKeepClearAlgorithm.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipKeepClearAlgorithm.kt
index e7eb8364466f..8fe584d292b7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipKeepClearAlgorithm.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipKeepClearAlgorithm.kt
@@ -399,7 +399,7 @@ class TvPipKeepClearAlgorithm(private val clock: () -> Long) {
return stashCandidates.minByOrNull {
val dx = abs(it.left - bounds.left)
val dy = abs(it.top - bounds.top)
- dx * bounds.height() + dy * bounds.width()
+ return@minByOrNull dx + dy
}!!
}