Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java +10 −34 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.common.split; import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW; import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.CURSOR_HOVER_STATES_ENABLED; import static com.android.wm.shell.shared.split.SplitScreenConstants.snapPositionToUIString; Loading Loading @@ -46,7 +45,6 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.widget.FrameLayout; Loading Loading @@ -357,9 +355,7 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { return false; } if (mDoubleTapDetector.onTouchEvent(event)) { return true; } mDoubleTapDetector.onTouchEvent(event); // Convert to use screen-based coordinates to prevent lost track of motion events while // moving divider bar and calculating dragging velocity. Loading Loading @@ -524,7 +520,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private void setTouching() { setSlippery(false); mHandle.setTouching(true, true); // Lift handle as well so it doesn't get behind the background, even though it doesn't // cast shadow. Loading @@ -536,7 +531,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private void releaseTouching() { setSlippery(true); mHandle.setTouching(false, true); mHandle.animate() .setInterpolator(Interpolators.FAST_OUT_SLOW_IN) Loading @@ -545,25 +539,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { .start(); } private void setSlippery(boolean slippery) { if (mViewHost == null) { return; } final WindowManager.LayoutParams lp = (WindowManager.LayoutParams) getLayoutParams(); final boolean isSlippery = (lp.flags & FLAG_SLIPPERY) != 0; if (isSlippery == slippery) { return; } if (slippery) { lp.flags |= FLAG_SLIPPERY; } else { lp.flags &= ~FLAG_SLIPPERY; } mViewHost.relayout(lp); } @Override public boolean onHoverEvent(MotionEvent event) { if (!DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, CURSOR_HOVER_STATES_ENABLED, Loading Loading @@ -648,17 +623,18 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private class DoubleTapListener extends GestureDetector.SimpleOnGestureListener { @Override public boolean onDoubleTap(MotionEvent e) { public boolean onDoubleTapEvent(@NonNull MotionEvent e) { // User could have started double tap and then dragged before letting go. Skip the // swap if so if (!mMoving && e.getAction() == MotionEvent.ACTION_UP) { if (mSplitLayout != null) { mSplitLayout.onDoubleTappedDivider(); } return true; } @Override public boolean onDoubleTapEvent(@NonNull MotionEvent e) { return true; return false; } } } libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java +1 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.common.split; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; Loading Loading @@ -128,8 +127,7 @@ public final class SplitWindowManager extends WindowlessWindowManager { final Rect dividerBounds = splitLayout.getDividerBounds(); WindowManager.LayoutParams lp = new WindowManager.LayoutParams( dividerBounds.width(), dividerBounds.height(), TYPE_DOCK_DIVIDER, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL | FLAG_WATCH_OUTSIDE_TOUCH | FLAG_SLIPPERY, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL | FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); lp.token = new Binder(); lp.setTitle(mWindowName); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java +10 −34 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.common.split; import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW; import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.CURSOR_HOVER_STATES_ENABLED; import static com.android.wm.shell.shared.split.SplitScreenConstants.snapPositionToUIString; Loading Loading @@ -46,7 +45,6 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.WindowInsets; import android.view.WindowManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.widget.FrameLayout; Loading Loading @@ -357,9 +355,7 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { return false; } if (mDoubleTapDetector.onTouchEvent(event)) { return true; } mDoubleTapDetector.onTouchEvent(event); // Convert to use screen-based coordinates to prevent lost track of motion events while // moving divider bar and calculating dragging velocity. Loading Loading @@ -524,7 +520,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private void setTouching() { setSlippery(false); mHandle.setTouching(true, true); // Lift handle as well so it doesn't get behind the background, even though it doesn't // cast shadow. Loading @@ -536,7 +531,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private void releaseTouching() { setSlippery(true); mHandle.setTouching(false, true); mHandle.animate() .setInterpolator(Interpolators.FAST_OUT_SLOW_IN) Loading @@ -545,25 +539,6 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { .start(); } private void setSlippery(boolean slippery) { if (mViewHost == null) { return; } final WindowManager.LayoutParams lp = (WindowManager.LayoutParams) getLayoutParams(); final boolean isSlippery = (lp.flags & FLAG_SLIPPERY) != 0; if (isSlippery == slippery) { return; } if (slippery) { lp.flags |= FLAG_SLIPPERY; } else { lp.flags &= ~FLAG_SLIPPERY; } mViewHost.relayout(lp); } @Override public boolean onHoverEvent(MotionEvent event) { if (!DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SYSTEMUI, CURSOR_HOVER_STATES_ENABLED, Loading Loading @@ -648,17 +623,18 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { } private class DoubleTapListener extends GestureDetector.SimpleOnGestureListener { @Override public boolean onDoubleTap(MotionEvent e) { public boolean onDoubleTapEvent(@NonNull MotionEvent e) { // User could have started double tap and then dragged before letting go. Skip the // swap if so if (!mMoving && e.getAction() == MotionEvent.ACTION_UP) { if (mSplitLayout != null) { mSplitLayout.onDoubleTappedDivider(); } return true; } @Override public boolean onDoubleTapEvent(@NonNull MotionEvent e) { return true; return false; } } }
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java +1 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.common.split; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY; import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; Loading Loading @@ -128,8 +127,7 @@ public final class SplitWindowManager extends WindowlessWindowManager { final Rect dividerBounds = splitLayout.getDividerBounds(); WindowManager.LayoutParams lp = new WindowManager.LayoutParams( dividerBounds.width(), dividerBounds.height(), TYPE_DOCK_DIVIDER, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL | FLAG_WATCH_OUTSIDE_TOUCH | FLAG_SLIPPERY, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL | FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); lp.token = new Binder(); lp.setTitle(mWindowName); Loading