diff options
| author | 2022-11-07 13:45:45 +0000 | |
|---|---|---|
| committer | 2022-11-07 13:45:45 +0000 | |
| commit | 5831db95f5d5fb6aff172ef9688536332710a809 (patch) | |
| tree | e4f6884818774c5d93f9496dae75e07aca71dbdb | |
| parent | b54fd1af09d3cc19354d2604fdbb5894f73883d1 (diff) | |
Enable shell split screen logging to diagnose not interactable divider
Bug: 255542849
Test: Presubmit and logcat
Change-Id: I9d85aa5d64281bc03152a97589f4976da940317d
5 files changed, 20 insertions, 13 deletions
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 8bc16bcc9d9d..1474754fc7f7 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 295a2e3c4244..0384f9eed7c5 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 @@ -1092,7 +1092,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; } @@ -1118,7 +1119,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 864b9a7528b0..060ac56cae96 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 c52ed249c2ca..75f9a4c33af9 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 15a11334307b..30746030b759 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; } |