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

Commit 6bf7881b authored by Merissa Mitchell's avatar Merissa Mitchell
Browse files

Put drag-corner-to-resize-pip behind flag.

Instead of using the resource config, put drag-corner-to-resize-pip
behind the enable_desktop_windowing_pip flag.

Bug: 375054477
Test: Check that drag-corner-to-resize PiP is not enabled unless the
flag is enabled.
Flag: com.android.window.flags.enable_desktop_windowing_pip

Change-Id: I63a9f6a5793cf0c1823a2f02bdc0cde2408107da
parent c2b26c17
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -45,9 +45,6 @@
    <!-- 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>

    <!-- Time (duration in milliseconds) that the shell waits for an app to close the PiP by itself
         if a custom action is present before closing it. -->
    <integer name="config_pipForceCloseDelay">1000</integer>
+2 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.view.ViewConfiguration;
import androidx.annotation.VisibleForTesting;

import com.android.internal.policy.TaskResizingAlgorithm;
import com.android.window.flags.Flags;
import com.android.wm.shell.R;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.pip.PipBoundsAlgorithm;
@@ -182,7 +183,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);
        mEnableDragCornerResize = Flags.enableDesktopWindowingPip();
        mTouchSlop = ViewConfiguration.get(mContext).getScaledTouchSlop();
    }