summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-03-15 20:08:38 +0800
committer Riddle Hsu <riddlehsu@google.com> 2024-03-18 14:37:40 +0800
commitc443a044f3fed25815d8a2be5eba204f7795fd1e (patch)
treee9c16a7ae528a88e6edd08f26ebc985199a53479
parentfb61358b71ded6a3b527ae52bef34aa7b6ff63f3 (diff)
Restore direct display children to display layer
This undoes I78d4832b0ff7623684fc22fe1f464a02a1d91477. Because now a display always has a real DisplayArea to provide windowing layer (created by DisplayAreaPolicyBuilder). Old: RootWrapper (DisplayContent#mSurfaceControl) > WindowingLayer (pure layer, not a WindowContainer) >> Child of display The surface of direct child under display uses WindowingLayer as parent. Now: Display (DisplayContent#mSurfaceControl) > WindowingLayer (DisplayArea) >> Child of WindowingLayer The surface of direct child under display uses display as parent. Because the surface hierarchy is consistent with window hierarchy. Bug: 326975721 Bug: 266243524 Test: AccessibilityOverlayTest#testA11yServiceShowsOverlayOnVirtualDisplay_shouldAppear Change-Id: I7a1d09eb566e29e532d56627a9955692b55a5682
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java5
-rw-r--r--services/core/java/com/android/server/wm/Transition.java6
2 files changed, 0 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index ce44bb5d5f36..3e8adc9dc5cd 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -5448,11 +5448,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
return b;
}
- // WARNING: it says `mSurfaceControl` below, but this CHANGES meaning after construction!
- // DisplayAreas are added in `configureSurface()` *before* `mSurfaceControl` gets replaced
- // with a wrapper or magnification surface so they end up in the right place; however,
- // anything added or reparented to "the display" *afterwards* needs to be reparented to
- // `getWindowinglayer()` (unless it's an overlay DisplayArea).
return b.setName(child.getName())
.setParent(mSurfaceControl);
}
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index 6d8b03020561..66c2e537ba9b 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -2542,12 +2542,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
// DisplayContent is the "root", so we reinterpret it's wc as the window layer
// making the parent surface the displaycontent's surface.
return wc.getSurfaceControl();
- } else if (wc.getParent().asDisplayContent() != null) {
- // DisplayContent is kinda split into 2 pieces, the "real root" and the
- // "windowing layer". So if the parent of the window is DC, then it really belongs on
- // the windowing layer (unless it's an overlay display area, but those can't be in
- // transitions anyways).
- return wc.getParent().asDisplayContent().getWindowingLayer();
}
return wc.getParent().getSurfaceControl();
}