Merge "Add a config to control split-screen task dimming" am: f012e83299
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2062848 Change-Id: I307cdd5926e98bf3ad8e56eb67e2c00b3a95af7c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -70,4 +70,7 @@
|
||||
|
||||
<!-- Animation duration when exit starting window: reveal app -->
|
||||
<integer name="starting_window_app_reveal_anim_duration">266</integer>
|
||||
|
||||
<!-- Whether to dim a split-screen task when the other is the IME target -->
|
||||
<bool name="config_dimNonImeAttachedSide">true</bool>
|
||||
</resources>
|
||||
|
||||
@@ -101,6 +101,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
private int mOrientation;
|
||||
private int mRotation;
|
||||
|
||||
private final boolean mDimNonImeSide;
|
||||
|
||||
public SplitLayout(String windowName, Context context, Configuration configuration,
|
||||
SplitLayoutHandler splitLayoutHandler,
|
||||
SplitWindowManager.ParentContainerCallbacks parentContainerCallbacks,
|
||||
@@ -125,6 +127,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
mRootBounds.set(configuration.windowConfiguration.getBounds());
|
||||
mDividerSnapAlgorithm = getSnapAlgorithm(mContext, mRootBounds);
|
||||
resetDividerPosition();
|
||||
|
||||
mDimNonImeSide = resources.getBoolean(R.bool.config_dimNonImeAttachedSide);
|
||||
}
|
||||
|
||||
private int getDividerInsets(Resources resources, Display display) {
|
||||
@@ -719,10 +723,10 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
|
||||
// Update target dim values
|
||||
mLastDim1 = mDimValue1;
|
||||
mTargetDim1 = imeTargetPosition == SPLIT_POSITION_BOTTOM_OR_RIGHT && showing
|
||||
? ADJUSTED_NONFOCUS_DIM : 0.0f;
|
||||
&& mDimNonImeSide ? ADJUSTED_NONFOCUS_DIM : 0.0f;
|
||||
mLastDim2 = mDimValue2;
|
||||
mTargetDim2 = imeTargetPosition == SPLIT_POSITION_TOP_OR_LEFT && showing
|
||||
? ADJUSTED_NONFOCUS_DIM : 0.0f;
|
||||
&& mDimNonImeSide ? ADJUSTED_NONFOCUS_DIM : 0.0f;
|
||||
|
||||
// Calculate target bounds offset for IME
|
||||
mLastYOffset = mYOffsetForIme;
|
||||
|
||||
Reference in New Issue
Block a user