Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ccbddf3 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Log PiP protolog to logcat

Bug: 282232877
Test: adb logcat | grep WindowManagerShell
Change-Id: I07d79159062cc0ba45c2f046db09879761755942
parent 65f443a6
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.util.Log;
import android.view.Choreographer;
import android.view.Display;
import android.view.Surface;
@@ -109,7 +108,6 @@ import java.util.function.IntConsumer;
public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        DisplayController.OnDisplaysChangedListener, ShellTaskOrganizer.FocusListener {
    private static final String TAG = PipTaskOrganizer.class.getSimpleName();
    private static final boolean DEBUG = false;

    /**
     * The fixed start delay in ms when fading out the content overlay from bounds animation.
@@ -1045,7 +1043,8 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
    void onExitPipFinished(TaskInfo info) {
        if (mLeash == null) {
            // TODO(239461594): Remove once the double call to onExitPipFinished() is fixed
            Log.w(TAG, "Warning, onExitPipFinished() called multiple times in the same sessino");
            ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                    "Warning, onExitPipFinished() called multiple times in the same session");
            return;
        }

@@ -1134,7 +1133,6 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
                && (mPipTransitionState.getTransitionState() != PipTransitionState.ENTERED_PIP);
        if ((mPipTransitionState.getInSwipePipToHomeTransition()
                || waitForFixedRotationOnEnteringPip) && fromRotation) {
            if (DEBUG) {
            ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                    "%s: Skip onMovementBoundsChanged on rotation change"
                            + " InSwipePipToHomeTransition=%b"
@@ -1142,7 +1140,6 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
                            + " getTransitionState=%d", TAG,
                    mPipTransitionState.getInSwipePipToHomeTransition(), mWaitForFixedRotation,
                    mPipTransitionState.getTransitionState());
            }
            return;
        }
        final PipAnimationController.PipTransitionAnimator animator =
@@ -1437,8 +1434,9 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        }

        if (mLeash == null || !mLeash.isValid()) {
            Log.e(TAG, String.format("scheduleFinishResizePip with null leash! mState=%d",
                  mPipTransitionState.getTransitionState()));
            ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                    "%s: scheduleFinishResizePip with null leash! mState=%d",
                    TAG, mPipTransitionState.getTransitionState());
            return;
        }

+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@ public enum ShellProtoLogGroup implements IProtoLogGroup {
            "ShellBackPreview"),
    WM_SHELL_RECENT_TASKS(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
            Consts.TAG_WM_SHELL),
    WM_SHELL_PICTURE_IN_PICTURE(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
    // TODO(b/282232877): turn logToLogcat to false.
    WM_SHELL_PICTURE_IN_PICTURE(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, true,
            Consts.TAG_WM_SHELL),
    WM_SHELL_SPLIT_SCREEN(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, true,
            Consts.TAG_WM_SPLIT_SCREEN),