Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb SystemProperties.getLong("persist.wm.debug.pip_keep_clear_areas_delay", 200); private boolean mEnablePipKeepClearAlgorithm = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", false); SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", true); @VisibleForTesting void setEnablePipKeepClearAlgorithm(boolean value) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java +8 −3 Original line number Diff line number Diff line Loading @@ -71,8 +71,13 @@ public class PipTouchHandler { private static final String TAG = "PipTouchHandler"; private static final float DEFAULT_STASH_VELOCITY_THRESHOLD = 18000.f; private static final boolean ENABLE_PIP_KEEP_CLEAR_ALGORITHM = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", false); private boolean mEnablePipKeepClearAlgorithm = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", true); @VisibleForTesting void setEnablePipKeepClearAlgorithm(boolean value) { mEnablePipKeepClearAlgorithm = value; } // Allow PIP to resize to a slightly bigger state upon touch private boolean mEnableResize; Loading Loading @@ -427,7 +432,7 @@ public class PipTouchHandler { if (mTouchState.isUserInteracting() && mTouchState.isDragging()) { // Defer the update of the current movement bounds until after the user finishes // touching the screen } else if (ENABLE_PIP_KEEP_CLEAR_ALGORITHM) { } else if (mEnablePipKeepClearAlgorithm) { // Ignore moving PiP if keep clear algorithm is enabled, since IME and shelf height // now are accounted for in the keep clear algorithm calculations } else { Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipControllerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,7 @@ public class PipControllerTest extends ShellTestCase { @Test public void onKeepClearAreasChanged_featureDisabled_pipBoundsStateDoesntChange() { mPipController.setEnablePipKeepClearAlgorithm(false); final int displayId = 1; final Rect keepClearArea = new Rect(0, 0, 10, 10); when(mMockPipBoundsState.getDisplayId()).thenReturn(displayId); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ public class PipTouchHandlerTest extends ShellTestCase { @Test public void updateMovementBounds_withImeAdjustment_movesPip() { mPipTouchHandler.setEnablePipKeepClearAlgorithm(false); mFromImeAdjustment = true; mPipTouchHandler.onImeVisibilityChanged(true /* imeVisible */, mImeHeight); Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ object Flags { sysPropBooleanFlag( 1110, "persist.wm.debug.enable_pip_keep_clear_algorithm", default = false default = true ) // TODO(b/256873975): Tracking Bug Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb SystemProperties.getLong("persist.wm.debug.pip_keep_clear_areas_delay", 200); private boolean mEnablePipKeepClearAlgorithm = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", false); SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", true); @VisibleForTesting void setEnablePipKeepClearAlgorithm(boolean value) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java +8 −3 Original line number Diff line number Diff line Loading @@ -71,8 +71,13 @@ public class PipTouchHandler { private static final String TAG = "PipTouchHandler"; private static final float DEFAULT_STASH_VELOCITY_THRESHOLD = 18000.f; private static final boolean ENABLE_PIP_KEEP_CLEAR_ALGORITHM = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", false); private boolean mEnablePipKeepClearAlgorithm = SystemProperties.getBoolean("persist.wm.debug.enable_pip_keep_clear_algorithm", true); @VisibleForTesting void setEnablePipKeepClearAlgorithm(boolean value) { mEnablePipKeepClearAlgorithm = value; } // Allow PIP to resize to a slightly bigger state upon touch private boolean mEnableResize; Loading Loading @@ -427,7 +432,7 @@ public class PipTouchHandler { if (mTouchState.isUserInteracting() && mTouchState.isDragging()) { // Defer the update of the current movement bounds until after the user finishes // touching the screen } else if (ENABLE_PIP_KEEP_CLEAR_ALGORITHM) { } else if (mEnablePipKeepClearAlgorithm) { // Ignore moving PiP if keep clear algorithm is enabled, since IME and shelf height // now are accounted for in the keep clear algorithm calculations } else { Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipControllerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,7 @@ public class PipControllerTest extends ShellTestCase { @Test public void onKeepClearAreasChanged_featureDisabled_pipBoundsStateDoesntChange() { mPipController.setEnablePipKeepClearAlgorithm(false); final int displayId = 1; final Rect keepClearArea = new Rect(0, 0, 10, 10); when(mMockPipBoundsState.getDisplayId()).thenReturn(displayId); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipTouchHandlerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ public class PipTouchHandlerTest extends ShellTestCase { @Test public void updateMovementBounds_withImeAdjustment_movesPip() { mPipTouchHandler.setEnablePipKeepClearAlgorithm(false); mFromImeAdjustment = true; mPipTouchHandler.onImeVisibilityChanged(true /* imeVisible */, mImeHeight); Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −1 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ object Flags { sysPropBooleanFlag( 1110, "persist.wm.debug.enable_pip_keep_clear_algorithm", default = false default = true ) // TODO(b/256873975): Tracking Bug Loading