Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 406aefce authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Use getLocationOnScreen() to determine home bounds" into ub-launcher3-edmonton

parents d936f6a5 678be9b8
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -588,8 +588,16 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
            dp = dp.getMultiWindowProfile(mContext,
                    new Point(minimizedHomeBounds.width(), minimizedHomeBounds.height()));
            dp.updateInsets(homeContentInsets);
        } else {
            if (mActivity != null) {
                int loc[] = new int[2];
                View rootView = mActivity.getRootView();
                rootView.getLocationOnScreen(loc);
                overviewStackBounds = new Rect(loc[0], loc[1], loc[0] + rootView.getWidth(),
                        loc[1] + rootView.getHeight());
            } else {
                overviewStackBounds = new Rect(0, 0, dp.widthPx, dp.heightPx);
            }
            // If we are not in multi-window mode, home insets should be same as system insets.
            Rect insets = new Rect();
            WindowManagerWrapper.getInstance().getStableInsets(insets);