Detect potential WindowConfiguration change at onApplyWindowInsets
- Invoke onConfiguration when receiving inset changes
- In Laucnher/RecentsActivity onConfiguration, additionally detect for windowConfiguration's rotation change; if Configuration stays the same, it'll be ignored.
Bug: 240730723
Test: manual on 90/180 degree rotation in Launcher and RecentsActivity
Change-Id: I7087878af847d62e1c715a4f52a18818d1a6c258
diff --git a/src/com/android/launcher3/LauncherRootView.java b/src/com/android/launcher3/LauncherRootView.java
index a5c5c02..1592154 100644
--- a/src/com/android/launcher3/LauncherRootView.java
+++ b/src/com/android/launcher3/LauncherRootView.java
@@ -55,6 +55,8 @@
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
+ mActivity.handleConfigurationChanged(mActivity.getResources().getConfiguration());
+
insets = WindowManagerProxy.INSTANCE.get(getContext())
.normalizeWindowInsets(getContext(), insets, mTempRect);
handleSystemWindowInsets(mTempRect);