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

Commit ecf8cd8f authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Fix divider touchable region am: 8eb8a32f

am: 5a15a0dd

* commit '5a15a0dd':
  Fix divider touchable region

Change-Id: If3eb98a836cdc97c8149c648251d44705855cec3
parents 35eefdb1 5a15a0dd
Loading
Loading
Loading
Loading
+9 −10
Original line number Original line Diff line number Diff line
@@ -240,16 +240,6 @@ public class DividerView extends FrameLayout implements OnTouchListener,
    protected void onAttachedToWindow() {
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        super.onAttachedToWindow();
        EventBus.getDefault().register(this);
        EventBus.getDefault().register(this);
        getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {

            @Override
            public void onGlobalLayout() {
                getViewTreeObserver().removeOnGlobalLayoutListener(this);
                mWindowManagerProxy.setTouchRegion(new Rect(mHandle.getLeft(), mHandle.getTop(),
                        mHandle.getLeft() + mHandle.getWidth(),
                        mHandle.getTop() + mHandle.getHeight()));
            }
        });
    }
    }


    @Override
    @Override
@@ -274,6 +264,15 @@ public class DividerView extends FrameLayout implements OnTouchListener,
        return super.onApplyWindowInsets(insets);
        return super.onApplyWindowInsets(insets);
    }
    }


    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        if (changed) {
            mWindowManagerProxy.setTouchRegion(new Rect(mHandle.getLeft(), mHandle.getTop(),
                    mHandle.getRight(), mHandle.getBottom()));
        }
    }

    public void setWindowManager(DividerWindowManager windowManager) {
    public void setWindowManager(DividerWindowManager windowManager) {
        mWindowManager = windowManager;
        mWindowManager = windowManager;
    }
    }