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

Commit d277022c authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Add some more Protologs to Shell-side Transitions" into sc-dev am: 8277f849

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13473347

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifb9109359d82f6fd5e54260701883e4e41030f2f
parents 55e8a792 8277f849
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -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",
+10 −0
Original line number Diff line number Diff line
@@ -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();
    }
}
+13 −3
Original line number Diff line number Diff line
@@ -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)) {
        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;
            }
        }