Add some more Protologs to Shell-side Transitions

Some more details about how local and remote transitions
are dispatched.

Bug: 172695387
Test: enable shell transitions and look at logs
Change-Id: I9edff6e43287514557b10b558a94c3300d835157
This commit is contained in:
Evan Rosky
2021-01-26 17:15:20 -08:00
parent 3191bf6c0f
commit 4146eb6af4
3 changed files with 77 additions and 3 deletions

View File

@@ -13,6 +13,12 @@
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
},
"-1671119352": {
"message": " Delegate animation for %s to %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/RemoteTransitionHandler.java"
},
"-1501874464": {
"message": "Fullscreen Task Appeared: #%d",
"level": "VERBOSE",
@@ -49,6 +55,24 @@
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
},
"-1308483871": {
"message": " try handler %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/Transitions.java"
},
"-1297259344": {
"message": " animated by %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/Transitions.java"
},
"-1269886472": {
"message": "Transition %s doesn't have explicit remote, search filters for match for %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/RemoteTransitionHandler.java"
},
"-1006733970": {
"message": "Display added: %d",
"level": "VERBOSE",
@@ -91,12 +115,24 @@
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/apppairs\/AppPairsController.java"
},
"138343607": {
"message": " try firstHandler %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/Transitions.java"
},
"157713005": {
"message": "Task info changed taskId=%d",
"level": "VERBOSE",
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
},
"214412327": {
"message": "RemoteTransition directly requested for %s: %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/RemoteTransitionHandler.java"
},
"274140888": {
"message": "Animate alpha: from=%d to=%d",
"level": "VERBOSE",
@@ -115,6 +151,12 @@
"group": "WM_SHELL_DRAG_AND_DROP",
"at": "com\/android\/wm\/shell\/draganddrop\/DragAndDropController.java"
},
"410592459": {
"message": "Invalid root leash (%s): %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/Transitions.java"
},
"473543554": {
"message": "%s onTaskAppeared Supported",
"level": "VERBOSE",
@@ -139,6 +181,12 @@
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/ShellTaskOrganizer.java"
},
"707170340": {
"message": " animated by firstHandler",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/Transitions.java"
},
"900599280": {
"message": "Can't pair unresizeable tasks task1.isResizeable=%b task1.isResizeable=%b",
"level": "ERROR",
@@ -163,6 +211,12 @@
"group": "WM_SHELL_TASK_ORG",
"at": "com\/android\/wm\/shell\/legacysplitscreen\/LegacySplitScreenTaskListener.java"
},
"990371881": {
"message": " Checking filter %s",
"level": "VERBOSE",
"group": "WM_SHELL_TRANSITIONS",
"at": "com\/android\/wm\/shell\/transition\/RemoteTransitionHandler.java"
},
"1070270131": {
"message": "onTransitionReady %s: %s",
"level": "VERBOSE",

View File

@@ -31,7 +31,9 @@ import android.window.TransitionInfo;
import android.window.TransitionRequestInfo;
import android.window.WindowContainerTransaction;
import com.android.internal.protolog.common.ProtoLog;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
import java.util.ArrayList;
@@ -71,14 +73,20 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
@NonNull Transitions.TransitionFinishCallback finishCallback) {
IRemoteTransition pendingRemote = mPendingRemotes.remove(transition);
if (pendingRemote == null) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Transition %s doesn't have "
+ "explicit remote, search filters for match for %s", transition, info);
// If no explicit remote, search filters until one matches
for (int i = mFilters.size() - 1; i >= 0; --i) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Checking filter %s",
mFilters.get(i));
if (mFilters.get(i).first.matches(info)) {
pendingRemote = mFilters.get(i).second;
break;
}
}
}
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Delegate animation for %s to %s",
transition, pendingRemote);
if (pendingRemote == null) return false;
@@ -121,6 +129,8 @@ public class RemoteTransitionHandler implements Transitions.TransitionHandler {
IRemoteTransition remote = request.getRemoteTransition();
if (remote == null) return null;
mPendingRemotes.put(transition, remote);
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "RemoteTransition directly requested"
+ " for %s: %s", transition, remote);
return new WindowContainerTransaction();
}
}

View File

@@ -232,6 +232,8 @@ public class Transitions {
if (!info.getRootLeash().isValid()) {
// Invalid root-leash implies that the transition is empty/no-op, so just do
// housekeeping and return.
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Invalid root leash (%s): %s",
transitionToken, info);
t.apply();
onFinish(transitionToken, null /* wct */, null /* wctCB */);
return;
@@ -241,14 +243,22 @@ public class Transitions {
final TransitionFinishCallback finishCb = (wct, cb) -> onFinish(transitionToken, wct, cb);
// If a handler chose to uniquely run this animation, try delegating to it.
if (active.mFirstHandler != null && active.mFirstHandler.startAnimation(
transitionToken, info, t, finishCb)) {
return;
if (active.mFirstHandler != null) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " try firstHandler %s",
active.mFirstHandler);
if (active.mFirstHandler.startAnimation(transitionToken, info, t, finishCb)) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " animated by firstHandler");
return;
}
}
// Otherwise give every other handler a chance (in order)
for (int i = mHandlers.size() - 1; i >= 0; --i) {
if (mHandlers.get(i) == active.mFirstHandler) continue;
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " try handler %s",
mHandlers.get(i));
if (mHandlers.get(i).startAnimation(transitionToken, info, t, finishCb)) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " animated by %s",
mHandlers.get(i));
return;
}
}