Merge "Update the divider touch-region properly" into rvc-dev am: f4f1079b96 am: d5a7a28cfd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11948950

Change-Id: I1b4f6c27f5cc7cf4aedc63b7dfa8e071e83353e3
This commit is contained in:
Evan Rosky
2020-06-22 22:08:23 +00:00
committed by Automerger Merge Worker

View File

@@ -352,8 +352,6 @@ public class DividerView extends FrameLayout implements OnTouchListener,
minimizeLeft + mMinimizedShadow.getMeasuredWidth(), minimizeLeft + mMinimizedShadow.getMeasuredWidth(),
minimizeTop + mMinimizedShadow.getMeasuredHeight()); minimizeTop + mMinimizedShadow.getMeasuredHeight());
if (changed) { if (changed) {
mWindowManagerProxy.setTouchRegion(new Rect(mHandle.getLeft(), mHandle.getTop(),
mHandle.getRight(), mHandle.getBottom()));
notifySplitScreenBoundsChanged(); notifySplitScreenBoundsChanged();
} }
} }
@@ -679,6 +677,14 @@ public class DividerView extends FrameLayout implements OnTouchListener,
private void notifySplitScreenBoundsChanged() { private void notifySplitScreenBoundsChanged() {
mOtherTaskRect.set(mSplitLayout.mSecondary); mOtherTaskRect.set(mSplitLayout.mSecondary);
mTmpRect.set(mHandle.getLeft(), mHandle.getTop(), mHandle.getRight(), mHandle.getBottom());
if (isHorizontalDivision()) {
mTmpRect.offsetTo(0, mDividerPositionY);
} else {
mTmpRect.offsetTo(mDividerPositionX, 0);
}
mWindowManagerProxy.setTouchRegion(mTmpRect);
mTmpRect.set(mSplitLayout.mDisplayLayout.stableInsets()); mTmpRect.set(mSplitLayout.mDisplayLayout.stableInsets());
switch (mSplitLayout.getPrimarySplitSide()) { switch (mSplitLayout.getPrimarySplitSide()) {
case WindowManager.DOCKED_LEFT: case WindowManager.DOCKED_LEFT: