Merge "Fix WM shell crash when targets belong to a different display." into tm-qpr-dev
This commit is contained in:
@@ -1645,8 +1645,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
|
|
||||||
WindowContainer<?> ancestor = findCommonAncestor(sortedTargets, changes, topApp);
|
WindowContainer<?> ancestor = findCommonAncestor(sortedTargets, changes, topApp);
|
||||||
|
|
||||||
// make leash based on highest (z-order) direct child of ancestor with a participant.
|
// Make leash based on highest (z-order) direct child of ancestor with a participant.
|
||||||
WindowContainer leashReference = sortedTargets.get(0);
|
// TODO(b/261418859): Handle the case when the target contains window containers which
|
||||||
|
// belong to a different display. As a workaround we use topApp, from which wallpaper
|
||||||
|
// window container is removed, instead of sortedTargets here.
|
||||||
|
WindowContainer leashReference = topApp;
|
||||||
while (leashReference.getParent() != ancestor) {
|
while (leashReference.getParent() != ancestor) {
|
||||||
leashReference = leashReference.getParent();
|
leashReference = leashReference.getParent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user