Loading libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java +14 −5 Original line number Diff line number Diff line Loading @@ -565,6 +565,7 @@ class DividerPresenter implements View.OnTouchListener { return true; } // Only called by onTouch() and mRenderer is already null-checked. @GuardedBy("mLock") private void onStartDragging(@NonNull MotionEvent event) { mVelocityTracker = VelocityTracker.obtain(); Loading @@ -590,6 +591,7 @@ class DividerPresenter implements View.OnTouchListener { }); } // Only called by onTouch() and mRenderer is already null-checked. @GuardedBy("mLock") private void onDrag(@NonNull MotionEvent event) { if (mVelocityTracker != null) { Loading Loading @@ -660,16 +662,21 @@ class DividerPresenter implements View.OnTouchListener { @GuardedBy("mLock") private void updateDividerPosition(int position) { if (mRenderer != null) { mRenderer.setDividerPosition(position); mRenderer.updateSurface(); } } @GuardedBy("mLock") private void onDraggingEnd() { // Veil visibility change should be applied together with the surface boost transaction in // the wct. final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); if (mRenderer != null) { mRenderer.hideVeils(t); } // Callbacks must be executed on the executor to release mLock and prevent deadlocks. // mDecorSurfaceOwner may change between here and when the callback is executed, Loading @@ -684,9 +691,11 @@ class DividerPresenter implements View.OnTouchListener { } }); }); if (mRenderer != null) { mRenderer.mIsDragging = false; mRenderer.mDragHandle.setPressed(mRenderer.mIsDragging); } } /** * Returns the divider position adjusted for the min max ratio and fullscreen expansion. Loading Loading
libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java +14 −5 Original line number Diff line number Diff line Loading @@ -565,6 +565,7 @@ class DividerPresenter implements View.OnTouchListener { return true; } // Only called by onTouch() and mRenderer is already null-checked. @GuardedBy("mLock") private void onStartDragging(@NonNull MotionEvent event) { mVelocityTracker = VelocityTracker.obtain(); Loading @@ -590,6 +591,7 @@ class DividerPresenter implements View.OnTouchListener { }); } // Only called by onTouch() and mRenderer is already null-checked. @GuardedBy("mLock") private void onDrag(@NonNull MotionEvent event) { if (mVelocityTracker != null) { Loading Loading @@ -660,16 +662,21 @@ class DividerPresenter implements View.OnTouchListener { @GuardedBy("mLock") private void updateDividerPosition(int position) { if (mRenderer != null) { mRenderer.setDividerPosition(position); mRenderer.updateSurface(); } } @GuardedBy("mLock") private void onDraggingEnd() { // Veil visibility change should be applied together with the surface boost transaction in // the wct. final SurfaceControl.Transaction t = new SurfaceControl.Transaction(); if (mRenderer != null) { mRenderer.hideVeils(t); } // Callbacks must be executed on the executor to release mLock and prevent deadlocks. // mDecorSurfaceOwner may change between here and when the callback is executed, Loading @@ -684,9 +691,11 @@ class DividerPresenter implements View.OnTouchListener { } }); }); if (mRenderer != null) { mRenderer.mIsDragging = false; mRenderer.mDragHandle.setPressed(mRenderer.mIsDragging); } } /** * Returns the divider position adjusted for the min max ratio and fullscreen expansion. Loading