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

Commit 9e9c3e74 authored by Vadim Caen's avatar Vadim Caen Committed by Android (Google) Code Review
Browse files

Merge "More verbose messaging for orientation debugging"

parents 4a8fc13d fc14c664
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2459,6 +2459,7 @@ public interface WindowManager extends ViewManager {
         * {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED}
         * will be used.
         */
        @ActivityInfo.ScreenOrientation
        public int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;

        /**
+12 −6
Original line number Diff line number Diff line
@@ -697,12 +697,6 @@
      "group": "WM_DEBUG_REMOTE_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RemoteAnimationController.java"
    },
    "-650040763": {
      "message": "rotationForOrientation(orient=%d, last=%d); user=%d %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/DisplayRotation.java"
    },
    "-635082269": {
      "message": "******** booted=%b msg=%b haveBoot=%b haveApp=%b haveWall=%b wallEnabled=%b haveKeyguard=%b",
      "level": "INFO",
@@ -901,6 +895,12 @@
      "group": "WM_DEBUG_WINDOW_MOVEMENT",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-177040661": {
      "message": "Start rotation animation. customAnim=%s, mCurRotation=%s, mOriginalRotation=%s",
      "level": "DEBUG",
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/ScreenRotationAnimation.java"
    },
    "-167822951": {
      "message": "Attempted to add starting window to token with already existing starting window",
      "level": "WARN",
@@ -1105,6 +1105,12 @@
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/ScreenRotationAnimation.java"
    },
    "202263690": {
      "message": "rotationForOrientation(orient=%s (%d), last=%s (%d)); user=%s (%d) %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/DisplayRotation.java"
    },
    "221540118": {
      "message": "mUserActivityTimeout set to %d",
      "level": "DEBUG",
+1 −0
Original line number Diff line number Diff line
@@ -2099,6 +2099,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
     * the above app windows specify orientation, the orientation is computed from the child window
     * container, e.g. {@link AppWindowToken#getOrientation(int)}.
     */
    @ScreenOrientation
    @Override
    int getOrientation() {
        final WindowManagerPolicy policy = mWmService.mPolicy;
+12 −8
Original line number Diff line number Diff line
@@ -1007,12 +1007,16 @@ public class DisplayRotation {
     * @return The surface rotation to use.
     */
    @VisibleForTesting
    int rotationForOrientation(int orientation, int lastRotation) {
        ProtoLog.v(WM_DEBUG_ORIENTATION, "rotationForOrientation(orient=%d, last=%d); user=%d %s",
                    orientation, lastRotation, mUserRotation,
    @Surface.Rotation
    int rotationForOrientation(@ScreenOrientation int orientation,
            @Surface.Rotation int lastRotation) {
        ProtoLog.v(WM_DEBUG_ORIENTATION,
                "rotationForOrientation(orient=%s (%d), last=%s (%d)); user=%s (%d) %s",
                ActivityInfo.screenOrientationToString(orientation), orientation,
                Surface.rotationToString(lastRotation), lastRotation,
                Surface.rotationToString(mUserRotation), mUserRotation,
                mUserRotationMode == WindowManagerPolicy.USER_ROTATION_LOCKED
                            ? "USER_ROTATION_LOCKED" : ""
                        );
                        ? "USER_ROTATION_LOCKED" : "");

        if (isFixedToUserRotation()) {
            return mUserRotation;
+5 −0
Original line number Diff line number Diff line
@@ -370,6 +370,11 @@ class ScreenRotationAnimation {
            }
        }

        ProtoLog.d(WM_DEBUG_ORIENTATION, "Start rotation animation. customAnim=%s, "
                        + "mCurRotation=%s, mOriginalRotation=%s",
                customAnim, Surface.rotationToString(mCurRotation),
                Surface.rotationToString(mOriginalRotation));

        mRotateExitAnimation.initialize(finalWidth, finalHeight, mOriginalWidth, mOriginalHeight);
        mRotateExitAnimation.restrictDuration(maxAnimationDuration);
        mRotateExitAnimation.scaleCurrentDuration(animationScale);
Loading