Better debbugging message for orientation

Test: N/A
Bug: N/A
Change-Id: Iefe688c3aa10857a6d7d87236a095605a62d1ff0
This commit is contained in:
Vadim Caen
2019-12-18 11:44:26 +01:00
parent b8edc67908
commit 1096f11e21
3 changed files with 32 additions and 17 deletions

View File

@@ -385,6 +385,12 @@
"group": "WM_ERROR",
"at": "com\/android\/server\/wm\/WindowManagerService.java"
},
"-1263316010": {
"message": "Computed rotation=%s (%d) for display id=%d based on lastOrientation=%s (%d) and oldRotation=%s (%d)",
"level": "VERBOSE",
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/DisplayRotation.java"
},
"-1259022216": {
"message": "SURFACE HIDE ( %s ): %s",
"level": "INFO",
@@ -463,6 +469,12 @@
"group": "WM_ERROR",
"at": "com\/android\/server\/wm\/WindowManagerService.java"
},
"-1108775960": {
"message": "%s is requesting orientation %d (%s)",
"level": "VERBOSE",
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/WindowContainer.java"
},
"-1103716954": {
"message": "Not removing %s due to exit animation",
"level": "VERBOSE",
@@ -631,6 +643,12 @@
"group": "WM_DEBUG_FOCUS_LIGHT",
"at": "com\/android\/server\/wm\/ActivityRecord.java"
},
"-766059044": {
"message": "Display id=%d selected orientation %s (%d), got rotation %s (%d)",
"level": "VERBOSE",
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/DisplayRotation.java"
},
"-760801764": {
"message": "onAnimationCancelled",
"level": "DEBUG",
@@ -1267,12 +1285,6 @@
"group": "WM_DEBUG_RECENTS_ANIMATIONS",
"at": "com\/android\/server\/wm\/RecentsAnimation.java"
},
"481370485": {
"message": "Computed rotation=%d for display id=%d based on lastOrientation=%d and oldRotation=%d",
"level": "VERBOSE",
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/DisplayRotation.java"
},
"490877640": {
"message": "onStackOrderChanged(): stack=%s",
"level": "DEBUG",
@@ -1795,12 +1807,6 @@
"group": "WM_ERROR",
"at": "com\/android\/server\/wm\/WindowManagerService.java"
},
"1573332272": {
"message": "Display id=%d selected orientation %d, got rotation %d",
"level": "VERBOSE",
"group": "WM_DEBUG_ORIENTATION",
"at": "com\/android\/server\/wm\/DisplayRotation.java"
},
"1577579529": {
"message": "win=%s destroySurfaces: appStopped=%b win.mWindowRemovalAllowed=%b win.mRemoveOnExit=%b",
"level": "ERROR",

View File

@@ -442,13 +442,17 @@ public class DisplayRotation {
final int lastOrientation = mLastOrientation;
final int rotation = rotationForOrientation(lastOrientation, oldRotation);
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Computed rotation=%d for display id=%d based on lastOrientation=%d and "
+ "oldRotation=%d",
rotation, displayId, lastOrientation, oldRotation);
"Computed rotation=%s (%d) for display id=%d based on lastOrientation=%s (%d) and "
+ "oldRotation=%s (%d)",
Surface.rotationToString(rotation), rotation,
displayId,
ActivityInfo.screenOrientationToString(lastOrientation), lastOrientation,
Surface.rotationToString(oldRotation), oldRotation);
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Display id=%d selected orientation %d, got rotation %d", displayId,
lastOrientation, rotation);
"Display id=%d selected orientation %s (%d), got rotation %s (%d)", displayId,
ActivityInfo.screenOrientationToString(lastOrientation), lastOrientation,
Surface.rotationToString(rotation), rotation);
if (oldRotation == rotation) {
// No change.

View File

@@ -30,6 +30,7 @@ import static android.view.SurfaceControl.Transaction;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS_ANIM;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ORIENTATION;
import static com.android.server.wm.WindowContainer.AnimationFlags.CHILDREN;
import static com.android.server.wm.WindowContainer.AnimationFlags.PARENTS;
import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;
@@ -132,6 +133,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
protected final WindowList<E> mChildren = new WindowList<E>();
// The specified orientation for this window container.
@ActivityInfo.ScreenOrientation
protected int mOrientation = SCREEN_ORIENTATION_UNSPECIFIED;
private final Pools.SynchronizedPool<ForAllWindowsConsumerWrapper> mConsumerWrapperPool =
@@ -984,6 +986,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
}
}
@ActivityInfo.ScreenOrientation
int getOrientation() {
return getOrientation(mOrientation);
}
@@ -1036,6 +1039,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
if (wc.fillsParent() || orientation != SCREEN_ORIENTATION_UNSPECIFIED) {
// Use the orientation if the container fills its parent or requested an explicit
// orientation that isn't SCREEN_ORIENTATION_UNSPECIFIED.
ProtoLog.v(WM_DEBUG_ORIENTATION, "%s is requesting orientation %d (%s)", toString(),
orientation, ActivityInfo.screenOrientationToString(orientation));
return orientation;
}
}