Merge "PiP: Disable enterSplit for now." into sc-v2-dev am: b80e7c46da am: 6c5c7f6fb8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16458641

Change-Id: Iad546b3ae5d1e9363e99caa3661f5f7044d9d415
This commit is contained in:
Ben Lin
2022-01-20 23:36:23 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 3 deletions

View File

@@ -43,6 +43,9 @@
<!-- PiP minimum size, which is a % based off the shorter side of display width and height -->
<fraction name="config_pipShortestEdgePercent">40%</fraction>
<!-- Show PiP enter split icon, which allows apps to directly enter splitscreen from PiP. -->
<bool name="config_pipEnableEnterSplitButton">false</bool>
<!-- Animation duration when using long press on recents to dock -->
<integer name="long_press_dock_anim_duration">250</integer>

View File

@@ -105,8 +105,6 @@ public class PipMenuView extends FrameLayout {
private static final float MENU_BACKGROUND_ALPHA = 0.3f;
private static final float DISABLED_ACTION_ALPHA = 0.54f;
private static final boolean ENABLE_ENTER_SPLIT = true;
private int mMenuState;
private boolean mAllowMenuTimeout = true;
private boolean mAllowTouches = true;
@@ -281,6 +279,8 @@ public class PipMenuView extends FrameLayout {
boolean resizeMenuOnShow, boolean withDelay, boolean showResizeHandle) {
mAllowMenuTimeout = allowMenuTimeout;
mDidLastShowMenuResize = resizeMenuOnShow;
final boolean enableEnterSplit =
mContext.getResources().getBoolean(R.bool.config_pipEnableEnterSplitButton);
if (mMenuState != menuState) {
// Disallow touches if the menu needs to resize while showing, and we are transitioning
// to/from a full menu state.
@@ -301,7 +301,7 @@ public class PipMenuView extends FrameLayout {
mDismissButton.getAlpha(), 1f);
ObjectAnimator enterSplitAnim = ObjectAnimator.ofFloat(mEnterSplitButton, View.ALPHA,
mEnterSplitButton.getAlpha(),
ENABLE_ENTER_SPLIT && mFocusedTaskAllowSplitScreen ? 1f : 0f);
enableEnterSplit && mFocusedTaskAllowSplitScreen ? 1f : 0f);
if (menuState == MENU_STATE_FULL) {
mMenuContainerAnimator.playTogether(menuAnim, settingsAnim, dismissAnim,
enterSplitAnim);