diff options
| author | 2022-02-11 01:06:36 +0800 | |
|---|---|---|
| committer | 2022-02-11 01:06:36 +0800 | |
| commit | 697b20fde79adccdba36e157b5fa894015cdfc5e (patch) | |
| tree | d3764dcb95b77de54f332b4c822eaa81c2ff47fc | |
| parent | de1ab8513a791af28710ea7c0a13cd4317f421b2 (diff) | |
Let top app can override insets behind notification shade
This CL gives fake controls to the top app while notification shade gets
pull down, so the app can still override its local insets of system
bars. In this way, the insets of the top app stay the same, and the
layout stays unchanged.
Fix: 218769393
Test: Pull down notification shade on a fullscreen app.
Change-Id: Iab48cc6912e1797a1e6509cee2cafa8ae290fe4e
| -rw-r--r-- | services/core/java/com/android/server/wm/InsetsPolicy.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java index 2f95119d67cb..d28dfd54c37f 100644 --- a/services/core/java/com/android/server/wm/InsetsPolicy.java +++ b/services/core/java/com/android/server/wm/InsetsPolicy.java @@ -144,15 +144,21 @@ class InsetsPolicy { getStatusControlTarget(focusedWin, false /* fake */); final InsetsControlTarget navControlTarget = getNavControlTarget(focusedWin, false /* fake */); + final WindowState notificationShade = mPolicy.getNotificationShade(); + final WindowState topApp = mPolicy.getTopFullscreenOpaqueWindow(); mStateController.onBarControlTargetChanged( statusControlTarget, statusControlTarget == mDummyControlTarget ? getStatusControlTarget(focusedWin, true /* fake */) - : null, + : statusControlTarget == notificationShade + ? getStatusControlTarget(topApp, true /* fake */) + : null, navControlTarget, navControlTarget == mDummyControlTarget ? getNavControlTarget(focusedWin, true /* fake */) - : null); + : navControlTarget == notificationShade + ? getNavControlTarget(topApp, true /* fake */) + : null); mStatusBar.updateVisibility(statusControlTarget, ITYPE_STATUS_BAR); mNavBar.updateVisibility(navControlTarget, ITYPE_NAVIGATION_BAR); } |