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

Commit a12bd507 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding some trace logging around RecentsController" into ub-launcher3-master

parents 9cbeced3 8a7351fe
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
        });
        handler.initWhenReady();

        TraceHelper.beginSection("RecentsController");
        Runnable startActivity = () -> ActivityManagerWrapper.getInstance()
                .startRecentsActivity(mHomeIntent,
                new AssistDataReceiver() {
@@ -342,9 +343,11 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
                            RemoteAnimationTargetCompat[] apps, Rect homeContentInsets,
                            Rect minimizedHomeBounds) {
                        if (mInteractionHandler == handler) {
                            TraceHelper.partitionSection("RecentsController", "Received");
                            handler.onRecentsAnimationStart(controller, apps, homeContentInsets,
                                    minimizedHomeBounds);
                        } else {
                            TraceHelper.endSection("RecentsController", "Finishing no handler");
                            controller.finish(false /* toHome */);
                        }

@@ -360,6 +363,8 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
                    }

                    public void onAnimationCanceled() {
                        TraceHelper.endSection("RecentsController",
                                "Cancelled: " + mInteractionHandler);
                        if (mInteractionHandler == handler) {
                            handler.onRecentsAnimationCanceled();
                        }
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.quickstep;

import com.android.launcher3.util.TraceHelper;
import com.android.systemui.shared.system.BackgroundExecutor;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -31,6 +32,7 @@ public class RecentsAnimationWrapper {

    public synchronized void setController(
            RecentsAnimationControllerCompat controller, RemoteAnimationTargetCompat[] targets) {
        TraceHelper.partitionSection("RecentsController", "Set controller " + controller);
        this.controller = controller;
        this.targets = targets;

@@ -46,6 +48,8 @@ public class RecentsAnimationWrapper {
    public void finish(boolean toHome, Runnable onFinishComplete) {
        BackgroundExecutor.get().submit(() -> {
            synchronized (this) {
                TraceHelper.endSection("RecentsController",
                        "Finish " + controller + ", toHome=" + toHome);
                if (controller != null) {
                    controller.setInputConsumerEnabled(false);
                    controller.finish(toHome);
@@ -62,6 +66,8 @@ public class RecentsAnimationWrapper {
        if (mInputConsumerEnabled) {
            BackgroundExecutor.get().submit(() -> {
                synchronized (this) {
                    TraceHelper.partitionSection("RecentsController",
                            "Enabling consumer on " + controller);
                    if (controller != null) {
                        controller.setInputConsumerEnabled(true);
                    }