Loading libs/WindowManager/Shell/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ filegroup { name: "wm_shell_util-sources", srcs: [ "src/com/android/wm/shell/util/**/*.java", "src/com/android/wm/shell/common/split/SplitScreenConstants.java" ], path: "src", } Loading libs/WindowManager/Shell/src/com/android/wm/shell/ShellCommandHandlerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.wm.shell; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import com.android.wm.shell.apppairs.AppPairsController; import com.android.wm.shell.common.ShellExecutor; Loading libs/WindowManager/Shell/src/com/android/wm/shell/apppairs/AppPair.java +3 −3 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.WindowManagerPolicyConstants.SPLIT_DIVIDER_LAYER; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_UNDEFINED; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_TASK_ORG; import android.app.ActivityManager; Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +4 −25 Original line number Diff line number Diff line Loading @@ -29,11 +29,13 @@ import static com.android.internal.policy.DividerSnapAlgorithm.SnapTarget.FLAG_D import static com.android.internal.policy.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START; import static com.android.wm.shell.animation.Interpolators.DIM_INTERPOLATOR; import static com.android.wm.shell.animation.Interpolators.SLOWDOWN_INTERPOLATOR; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.IntDef; import android.annotation.NonNull; import android.app.ActivityManager; import android.content.Context; Loading Loading @@ -61,6 +63,7 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.animation.Interpolators; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.common.DisplayInsetsController; import com.android.wm.shell.common.split.SplitScreenConstants.SplitPosition; import java.io.PrintWriter; Loading @@ -69,30 +72,6 @@ import java.io.PrintWriter; * divide position changes. */ public final class SplitLayout implements DisplayInsetsController.OnInsetsChangedListener { /** * Split position isn't specified normally meaning to use what ever it is currently set to. */ public static final int SPLIT_POSITION_UNDEFINED = -1; /** * Specifies that a split is positioned at the top half of the screen if * in portrait mode or at the left half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_TOP_OR_LEFT = 0; /** * Specifies that a split is positioned at the bottom half of the screen if * in portrait mode or at the right half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_BOTTOM_OR_RIGHT = 1; @IntDef(prefix = {"SPLIT_POSITION_"}, value = { SPLIT_POSITION_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT, SPLIT_POSITION_BOTTOM_OR_RIGHT }) public @interface SplitPosition { } private final int mDividerWindowWidth; private final int mDividerInsets; Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.common.split; import android.annotation.IntDef; /** Helper utility class of methods and constants that are available to be imported in Launcher. */ public class SplitScreenConstants { /** * Split position isn't specified normally meaning to use what ever it is currently set to. */ public static final int SPLIT_POSITION_UNDEFINED = -1; /** * Specifies that a split is positioned at the top half of the screen if * in portrait mode or at the left half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_TOP_OR_LEFT = 0; /** * Specifies that a split is positioned at the bottom half of the screen if * in portrait mode or at the right half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_BOTTOM_OR_RIGHT = 1; @IntDef(prefix = {"SPLIT_POSITION_"}, value = { SPLIT_POSITION_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT, SPLIT_POSITION_BOTTOM_OR_RIGHT }) public @interface SplitPosition { } } Loading
libs/WindowManager/Shell/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ filegroup { name: "wm_shell_util-sources", srcs: [ "src/com/android/wm/shell/util/**/*.java", "src/com/android/wm/shell/common/split/SplitScreenConstants.java" ], path: "src", } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/ShellCommandHandlerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package com.android.wm.shell; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import com.android.wm.shell.apppairs.AppPairsController; import com.android.wm.shell.common.ShellExecutor; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/apppairs/AppPair.java +3 −3 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.WindowManagerPolicyConstants.SPLIT_DIVIDER_LAYER; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitLayout.SPLIT_POSITION_UNDEFINED; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_TASK_ORG; import android.app.ActivityManager; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +4 −25 Original line number Diff line number Diff line Loading @@ -29,11 +29,13 @@ import static com.android.internal.policy.DividerSnapAlgorithm.SnapTarget.FLAG_D import static com.android.internal.policy.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START; import static com.android.wm.shell.animation.Interpolators.DIM_INTERPOLATOR; import static com.android.wm.shell.animation.Interpolators.SLOWDOWN_INTERPOLATOR; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.IntDef; import android.annotation.NonNull; import android.app.ActivityManager; import android.content.Context; Loading Loading @@ -61,6 +63,7 @@ import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.animation.Interpolators; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.common.DisplayInsetsController; import com.android.wm.shell.common.split.SplitScreenConstants.SplitPosition; import java.io.PrintWriter; Loading @@ -69,30 +72,6 @@ import java.io.PrintWriter; * divide position changes. */ public final class SplitLayout implements DisplayInsetsController.OnInsetsChangedListener { /** * Split position isn't specified normally meaning to use what ever it is currently set to. */ public static final int SPLIT_POSITION_UNDEFINED = -1; /** * Specifies that a split is positioned at the top half of the screen if * in portrait mode or at the left half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_TOP_OR_LEFT = 0; /** * Specifies that a split is positioned at the bottom half of the screen if * in portrait mode or at the right half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_BOTTOM_OR_RIGHT = 1; @IntDef(prefix = {"SPLIT_POSITION_"}, value = { SPLIT_POSITION_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT, SPLIT_POSITION_BOTTOM_OR_RIGHT }) public @interface SplitPosition { } private final int mDividerWindowWidth; private final int mDividerInsets; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.common.split; import android.annotation.IntDef; /** Helper utility class of methods and constants that are available to be imported in Launcher. */ public class SplitScreenConstants { /** * Split position isn't specified normally meaning to use what ever it is currently set to. */ public static final int SPLIT_POSITION_UNDEFINED = -1; /** * Specifies that a split is positioned at the top half of the screen if * in portrait mode or at the left half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_TOP_OR_LEFT = 0; /** * Specifies that a split is positioned at the bottom half of the screen if * in portrait mode or at the right half of the screen if in landscape mode. */ public static final int SPLIT_POSITION_BOTTOM_OR_RIGHT = 1; @IntDef(prefix = {"SPLIT_POSITION_"}, value = { SPLIT_POSITION_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT, SPLIT_POSITION_BOTTOM_OR_RIGHT }) public @interface SplitPosition { } }