Merge changes from topic "presubmit-am-032b75464d75462f9af7baff82a93ac3" into tm-qpr-dev-plus-aosp

* changes:
  [automerge] DO NOT MERGE Fix crash related to getting the root of an unattached view 2p: 68cb239bb0
  DO NOT MERGE Fix crash related to getting the root of an unattached view
This commit is contained in:
Lucas Silva
2023-04-13 19:13:02 +00:00
committed by Android (Google) Code Review

View File

@@ -90,6 +90,9 @@ public class TouchInsetManager {
final Region cumulativeRegion = Region.obtain();
mTrackedViews.stream().forEach(view -> {
if (!view.isAttachedToWindow()) {
return;
}
final Rect boundaries = new Rect();
view.getDrawingRect(boundaries);
((ViewGroup) view.getRootView()).offsetDescendantRectToMyCoords(view, boundaries);