PiP: Disable corner resizing.
This is done by disabling all the trigger points (the 4 corners). Will hold off on removing the entire code until later in case needed. Bug: 179299163 Test: Manual. Dragging from the corner no longer works Change-Id: I4ed931245cbb49647feeff8b37174f6502fe9c5e
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
<!-- Allow PIP to resize to a slightly bigger state upon touch/showing the menu -->
|
||||
<bool name="config_pipEnableResizeForMenu">true</bool>
|
||||
|
||||
<!-- Allow PIP to resize via dragging the corner of PiP. -->
|
||||
<bool name="config_pipEnableDragCornerResize">false</bool>
|
||||
|
||||
<!-- Allow PIP to enable round corner, see also R.dimen.pip_corner_radius -->
|
||||
<bool name="config_pipEnableRoundCorner">false</bool>
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ public class PipResizeGestureHandler {
|
||||
private boolean mIsAttached;
|
||||
private boolean mIsEnabled;
|
||||
private boolean mEnablePinchResize;
|
||||
private boolean mEnableDragCornerResize;
|
||||
private boolean mIsSysUiStateValid;
|
||||
private boolean mThresholdCrossed;
|
||||
private boolean mOngoingPinchToResize = false;
|
||||
@@ -174,6 +175,7 @@ public class PipResizeGestureHandler {
|
||||
private void reloadResources() {
|
||||
final Resources res = mContext.getResources();
|
||||
mDelta = res.getDimensionPixelSize(R.dimen.pip_resize_edge_size);
|
||||
mEnableDragCornerResize = res.getBoolean(R.bool.config_pipEnableDragCornerResize);
|
||||
mTouchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
|
||||
}
|
||||
|
||||
@@ -267,6 +269,10 @@ public class PipResizeGestureHandler {
|
||||
* |_|_| |_|_|
|
||||
*/
|
||||
public boolean isWithinDragResizeRegion(int x, int y) {
|
||||
if (!mEnableDragCornerResize) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Rect currentPipBounds = mPipBoundsState.getBounds();
|
||||
if (currentPipBounds == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user