From ca129bc5cab2b8b174cfff538a026f004b31d91b Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Wed, 18 Oct 2023 07:24:44 +0000 Subject: [PATCH] Separate rotationHint as different object of WindowBounds Some WindowBounds object with different rotation would be ignore in DisplayController#supportedBounds due to there already exists an object with the same bounds. Bug: 304284870 Test: open app then rotate tablet device to 90 or 270, close app and monitor the closing target flying back to the expected position. Flag: N/A Change-Id: I97f070cfaf7c6243ae3cd95cb728f7041a3736d1 --- src/com/android/launcher3/util/WindowBounds.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/util/WindowBounds.java b/src/com/android/launcher3/util/WindowBounds.java index 91480e17c4..ec3b6424c1 100644 --- a/src/com/android/launcher3/util/WindowBounds.java +++ b/src/com/android/launcher3/util/WindowBounds.java @@ -67,7 +67,8 @@ public class WindowBounds { return false; } WindowBounds other = (WindowBounds) obj; - return other.bounds.equals(bounds) && other.insets.equals(insets); + return other.bounds.equals(bounds) && other.insets.equals(insets) + && other.rotationHint == rotationHint; } @Override