summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2025-02-28 11:24:38 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2025-02-28 11:24:38 +0000
commita0946e1029ccf321e898834c053b89967f848c16 (patch)
tree2fc0d911ec0e6fb227639c0ca76227e24dac75f4
parentbadfb5945b88b604c22142ae37d0602c359d57ba (diff)
Log warning if shade move request is not honored
As we're using "collectLatest", there are legit cases when the move request is issued towards a display where the shade is at already (e.g. the display id changed again before the shade completed the move, the scope is cancelled, and we're calling moveShadeWindowTo again with the original display) We're still logging it as it might also signal some bug in the move. Bug: 362719719 Test: ShadeDisplaysInteractor Flag: com.android.systemui.shade_window_goes_around Change-Id: I0922a235d8a87ccd43170e38c2918ea3b10ed942
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractor.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractor.kt
index 9a5c96824e77..930b1cb1905c 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDisplaysInteractor.kt
@@ -108,7 +108,8 @@ constructor(
val currentDisplay = shadeContext.display ?: error("Current shade display is null")
currentId = currentDisplay.displayId
if (currentId == destinationId) {
- error("Trying to move the shade to a display it was already in")
+ Log.w(TAG, "Trying to move the shade to a display ($currentId) it was already in ")
+ return
}
withContext(mainThreadContext) {