Adding some trace logging around RecentsController
Change-Id: Ieb019d3d8c5f8540cba7b162f4c6f911d2005f5a
diff --git a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
index 786ade3..db50a00 100644
--- a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
+++ b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
@@ -328,6 +328,7 @@
});
handler.initWhenReady();
+ TraceHelper.beginSection("RecentsController");
Runnable startActivity = () -> ActivityManagerWrapper.getInstance()
.startRecentsActivity(mHomeIntent,
new AssistDataReceiver() {
@@ -342,9 +343,11 @@
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 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 28229f6..4e11220 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 synchronized void setController(
RecentsAnimationControllerCompat controller, RemoteAnimationTargetCompat[] targets) {
+ TraceHelper.partitionSection("RecentsController", "Set controller " + controller);
this.controller = controller;
this.targets = targets;
@@ -46,6 +48,8 @@
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 @@
if (mInputConsumerEnabled) {
BackgroundExecutor.get().submit(() -> {
synchronized (this) {
+ TraceHelper.partitionSection("RecentsController",
+ "Enabling consumer on " + controller);
if (controller != null) {
controller.setInputConsumerEnabled(true);
}