From 8a7351fec6dbcc1f4312ef9e2ac43bf0e6ddd4d3 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 22 Feb 2018 16:32:35 -0800 Subject: [PATCH] Adding some trace logging around RecentsController Change-Id: Ieb019d3d8c5f8540cba7b162f4c6f911d2005f5a --- .../com/android/quickstep/OtherActivityTouchConsumer.java | 5 +++++ .../src/com/android/quickstep/RecentsAnimationWrapper.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java index 786ade38bd..db50a0068b 100644 --- a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java +++ b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java @@ -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(); } diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java b/quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java index 28229f6c0f..4e11220745 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationWrapper.java @@ -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); }