Handle display windowing mode change in onConfigChanged

This CL allows onConfigChanged to handle the changes of
showLockedTaskbarOnHome().
The return value of showLockedTaskbarOnHome() depends on the display
windowing mode. And onConfigChanged() is triggered when the display
windowing mode changes (e.g. by adb shell wm set-display-windowing
mode).

Bug: 375321881
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays
Test: DisplayControllerTest
Test: manual
Change-Id: I1932f460735b9517cc68170c01cd45ca9bacfeb0
This commit is contained in:
Toshiki Kikuchi committed 2024-10-28 08:47:26 +09:00
1 parent 4dc6617988
commit b00c260669
2 files changed
+20 -1

No files matched your search

@@ -255,7 +255,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable {
|| config.fontScale != mInfo.fontScale
|| !mInfo.mScreenSizeDp.equals(
new PortraitSize(config.screenHeightDp, config.screenWidthDp))
|| mWindowContext.getDisplay().getRotation() != mInfo.rotation) {
|| mWindowContext.getDisplay().getRotation() != mInfo.rotation
|| WindowManagerProxy.INSTANCE.get(mContext).showLockedTaskbarOnHome(mWindowContext)
!= mInfo.showLockedTaskbarOnHome()) {
notifyConfigChange();
}
}