Merge "Move DEBUG_INPUT_METHOD logs into proto logs for debugging IME snapshot" into tm-dev
This commit is contained in:
commit
697afc9660
@ -19,6 +19,12 @@
|
||||
"group": "WM_DEBUG_LOCKTASK",
|
||||
"at": "com\/android\/server\/wm\/LockTaskController.java"
|
||||
},
|
||||
"-2111539867": {
|
||||
"message": "remove IME snapshot, caller=%s",
|
||||
"level": "INFO",
|
||||
"group": "WM_DEBUG_IME",
|
||||
"at": "com\/android\/server\/wm\/DisplayContent.java"
|
||||
},
|
||||
"-2109936758": {
|
||||
"message": "removeAppToken make exiting: %s",
|
||||
"level": "VERBOSE",
|
||||
@ -265,6 +271,12 @@
|
||||
"group": "WM_DEBUG_RESIZE",
|
||||
"at": "com\/android\/server\/wm\/WindowState.java"
|
||||
},
|
||||
"-1814361639": {
|
||||
"message": "Set IME snapshot position: (%d, %d)",
|
||||
"level": "INFO",
|
||||
"group": "WM_DEBUG_IME",
|
||||
"at": "com\/android\/server\/wm\/DisplayContent.java"
|
||||
},
|
||||
"-1810446914": {
|
||||
"message": "Trying to update display configuration for system\/invalid process.",
|
||||
"level": "WARN",
|
||||
@ -307,6 +319,12 @@
|
||||
"group": "WM_DEBUG_REMOTE_ANIMATIONS",
|
||||
"at": "com\/android\/server\/wm\/RemoteAnimationController.java"
|
||||
},
|
||||
"-1777010776": {
|
||||
"message": "create IME snapshot for %s, buff width=%s, height=%s",
|
||||
"level": "INFO",
|
||||
"group": "WM_DEBUG_IME",
|
||||
"at": "com\/android\/server\/wm\/DisplayContent.java"
|
||||
},
|
||||
"-1770075711": {
|
||||
"message": "Adding window client %s that is dead, aborting.",
|
||||
"level": "WARN",
|
||||
@ -1375,6 +1393,12 @@
|
||||
"group": "WM_DEBUG_ORIENTATION",
|
||||
"at": "com\/android\/server\/wm\/RootWindowContainer.java"
|
||||
},
|
||||
"-658964693": {
|
||||
"message": "onWindowAnimationFinished, wc=%s, type=%s, imeSnapshot=%s, target=%s",
|
||||
"level": "INFO",
|
||||
"group": "WM_DEBUG_IME",
|
||||
"at": "com\/android\/server\/wm\/DisplayContent.java"
|
||||
},
|
||||
"-655104359": {
|
||||
"message": "Frontmost changed immersion: %s",
|
||||
"level": "DEBUG",
|
||||
@ -1945,6 +1969,12 @@
|
||||
"group": "WM_DEBUG_WINDOW_ORGANIZER",
|
||||
"at": "com\/android\/server\/wm\/TaskFragmentOrganizerController.java"
|
||||
},
|
||||
"-57750640": {
|
||||
"message": "show IME snapshot, ime target=%s, callers=%s",
|
||||
"level": "INFO",
|
||||
"group": "WM_DEBUG_IME",
|
||||
"at": "com\/android\/server\/wm\/DisplayContent.java"
|
||||
},
|
||||
"-55185509": {
|
||||
"message": "setFocusedTask: taskId=%d touchedActivity=%s",
|
||||
"level": "DEBUG",
|
||||
|
@ -4044,11 +4044,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
private SurfaceControl createImeSurface(SurfaceControl.ScreenshotHardwareBuffer b,
|
||||
Transaction t) {
|
||||
final HardwareBuffer buffer = b.getHardwareBuffer();
|
||||
if (DEBUG_INPUT_METHOD) {
|
||||
Slog.d(TAG, "create IME snapshot for "
|
||||
+ mImeTarget + ", buff width=" + buffer.getWidth()
|
||||
+ ", height=" + buffer.getHeight());
|
||||
}
|
||||
ProtoLog.i(WM_DEBUG_IME, "create IME snapshot for %s, buff width=%s, height=%s",
|
||||
mImeTarget, buffer.getWidth(), buffer.getHeight());
|
||||
final WindowState imeWindow = mImeTarget.getDisplayContent().mInputMethodWindow;
|
||||
final ActivityRecord activity = mImeTarget.mActivityRecord;
|
||||
final SurfaceControl imeParent = mImeTarget.mAttrs.type == TYPE_BASE_APPLICATION
|
||||
@ -4084,12 +4081,14 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
mImeTarget.mAttrs.surfaceInsets.top);
|
||||
t.setPosition(imeSurface, surfacePosition.x, surfacePosition.y);
|
||||
}
|
||||
ProtoLog.i(WM_DEBUG_IME, "Set IME snapshot position: (%d, %d)", surfacePosition.x,
|
||||
surfacePosition.y);
|
||||
return imeSurface;
|
||||
}
|
||||
|
||||
private void removeImeSurface(Transaction t) {
|
||||
if (mImeSurface != null) {
|
||||
if (DEBUG_INPUT_METHOD) Slog.d(TAG, "remove IME snapshot");
|
||||
ProtoLog.i(WM_DEBUG_IME, "remove IME snapshot, caller=%s", Debug.getCallers(6));
|
||||
t.remove(mImeSurface);
|
||||
mImeSurface = null;
|
||||
}
|
||||
@ -4119,9 +4118,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
// to reflect the true IME insets visibility and the app task layout as possible.
|
||||
if (isValidSnapshot
|
||||
&& dc.getInsetsStateController().getImeSourceProvider().isImeShowing()) {
|
||||
if (DEBUG_INPUT_METHOD) {
|
||||
Slog.d(TAG, "show IME snapshot, ime target=" + mImeTarget);
|
||||
}
|
||||
ProtoLog.i(WM_DEBUG_IME, "show IME snapshot, ime target=%s, callers=%s",
|
||||
mImeTarget, Debug.getCallers(6));
|
||||
t.show(mImeSurface);
|
||||
} else if (!isValidSnapshot) {
|
||||
removeImeSurface(t);
|
||||
@ -4488,6 +4486,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
* hierarchy.
|
||||
*/
|
||||
void onWindowAnimationFinished(@NonNull WindowContainer wc, int type) {
|
||||
if (mImeScreenshot != null) {
|
||||
ProtoLog.i(WM_DEBUG_IME,
|
||||
"onWindowAnimationFinished, wc=%s, type=%s, imeSnapshot=%s, target=%s",
|
||||
wc, SurfaceAnimator.animationTypeToString(type), mImeScreenshot,
|
||||
mImeScreenshot.getImeTarget());
|
||||
}
|
||||
if (mImeScreenshot != null && (wc == mImeScreenshot.getImeTarget()
|
||||
|| wc.getWindow(w -> w == mImeScreenshot.getImeTarget()) != null)
|
||||
&& (type & WindowState.EXIT_ANIMATING_TYPES) != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user