Adding some trace logging around RecentsController

Change-Id: Ieb019d3d8c5f8540cba7b162f4c6f911d2005f5a
This commit is contained in:
Sunny Goyal
2018-02-22 16:32:35 -08:00
parent 38b8779bd3
commit 8a7351fec6
2 changed files with 11 additions and 0 deletions
@@ -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();
}
@@ -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);
}