diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java index 8bc16bcc9d9d1..1474754fc7f73 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java @@ -46,8 +46,10 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.android.internal.policy.DividerSnapAlgorithm; +import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.R; import com.android.wm.shell.animation.Interpolators; +import com.android.wm.shell.protolog.ShellProtoLogGroup; /** * Divider for multi window splits. @@ -364,8 +366,11 @@ public class DividerView extends FrameLayout implements View.OnTouchListener { mViewHost.relayout(lp); } - void setInteractive(boolean interactive) { + void setInteractive(boolean interactive, String from) { if (interactive == mInteractive) return; + ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, + "Set divider bar %s from %s", interactive ? "interactive" : "non-interactive", + from); mInteractive = interactive; releaseTouching(); mHandle.setVisibility(mInteractive ? View.VISIBLE : View.INVISIBLE); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java index e578539c3f796..839edc8c174aa 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java @@ -1093,7 +1093,8 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange // ImePositionProcessor#onImeVisibilityChanged directly in DividerView is not enough // because DividerView won't receive onImeVisibilityChanged callback after it being // re-inflated. - mSplitWindowManager.setInteractive(!mImeShown || !mHasImeFocus); + mSplitWindowManager.setInteractive(!mImeShown || !mHasImeFocus, + "onImeStartPositioning"); return needOffset ? IME_ANIMATION_NO_ALPHA : 0; } @@ -1119,7 +1120,7 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange // Restore the split layout when wm-shell is not controlling IME insets anymore. if (!controlling && mImeShown) { reset(); - mSplitWindowManager.setInteractive(true); + mSplitWindowManager.setInteractive(true, "onImeControlTargetChanged"); mSplitLayoutHandler.setLayoutOffsetTarget(0, 0, SplitLayout.this); mSplitLayoutHandler.onLayoutPositionChanging(SplitLayout.this); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java index 864b9a7528b0e..060ac56cae966 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java @@ -166,9 +166,9 @@ public final class SplitWindowManager extends WindowlessWindowManager { } } - void setInteractive(boolean interactive) { + void setInteractive(boolean interactive, String from) { if (mDividerView == null) return; - mDividerView.setInteractive(interactive); + mDividerView.setInteractive(interactive, from); } View getDividerView() { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java index c52ed249c2ca7..75f9a4c33af91 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java @@ -42,8 +42,8 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { Consts.TAG_WM_SHELL), WM_SHELL_PICTURE_IN_PICTURE(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_SHELL), - WM_SHELL_SPLIT_SCREEN(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, - Consts.TAG_WM_SHELL), + WM_SHELL_SPLIT_SCREEN(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, true, + Consts.TAG_WM_SPLIT_SCREEN), WM_SHELL_SYSUI_EVENTS(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_SHELL), WM_SHELL_DESKTOP_MODE(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, @@ -110,6 +110,7 @@ public enum ShellProtoLogGroup implements IProtoLogGroup { private static class Consts { private static final String TAG_WM_SHELL = "WindowManagerShell"; private static final String TAG_WM_STARTING_WINDOW = "ShellStartingWindow"; + private static final String TAG_WM_SPLIT_SCREEN = "ShellSplitScreen"; private static final boolean ENABLE_DEBUG = true; private static final boolean ENABLE_LOG_TO_PROTO_DEBUG = true; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index e03bf2a611993..e888c6f8b0f93 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -1097,7 +1097,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, activityTaskManagerService.setFocusedTask(getTaskId(stageToFocus)); } catch (RemoteException | NullPointerException e) { ProtoLog.e(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Unable to update focus on the chosen stage, %s", TAG, e); + "Unable to update focus on the chosen stage: %s", e.getMessage()); } } @@ -1434,14 +1434,14 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, } ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Request to %s divider bar from %s.", TAG, + "Request to %s divider bar from %s.", (visible ? "show" : "hide"), Debug.getCaller()); // Defer showing divider bar after keyguard dismissed, so it won't interfere with keyguard // dismissing animation. if (visible && mKeyguardShowing) { ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Defer showing divider bar due to keyguard showing.", TAG); + " Defer showing divider bar due to keyguard showing."); return; } @@ -1450,7 +1450,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, if (mIsDividerRemoteAnimating) { ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Skip animating divider bar due to it's remote animating.", TAG); + " Skip animating divider bar due to it's remote animating."); return; } @@ -1465,12 +1465,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, final SurfaceControl dividerLeash = mSplitLayout.getDividerLeash(); if (dividerLeash == null) { ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Skip animating divider bar due to divider leash not ready.", TAG); + " Skip animating divider bar due to divider leash not ready."); return; } if (mIsDividerRemoteAnimating) { ProtoLog.d(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, - "%s: Skip animating divider bar due to it's remote animating.", TAG); + " Skip animating divider bar due to it's remote animating."); return; }