summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-11-16 14:58:39 -0800
committerSunny Goyal <sunnygoyal@google.com>2017-11-16 17:02:40 -0800
commit27887b2c64639841a31bf3ebc6e17cae1e21fae6 (patch)
tree5b07b69b127a9caab685f00a2907e02d1654c0bd /quickstep
parenta3921c7ba8bee7b74b4c2b8d4e38219b414bbba7 (diff)
downloadandroid_packages_apps_Trebuchet-27887b2c64639841a31bf3ebc6e17cae1e21fae6.tar.gz
android_packages_apps_Trebuchet-27887b2c64639841a31bf3ebc6e17cae1e21fae6.tar.bz2
android_packages_apps_Trebuchet-27887b2c64639841a31bf3ebc6e17cae1e21fae6.zip
Adding some tracing for touch interaction
Change-Id: Ibbd54b5a0d397312e8f83bdcc2b7d93f309f8f7a
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java4
-rw-r--r--quickstep/src/com/android/quickstep/TouchInteractionService.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java b/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
index e03a2ff60..af82fe9e1 100644
--- a/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
+++ b/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
@@ -42,6 +42,7 @@ import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.states.InternalStateHandler;
+import com.android.launcher3.util.TraceHelper;
import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
@@ -153,11 +154,13 @@ public class NavBarSwipeInteractionHandler extends InternalStateHandler {
@Override
public void onLauncherResume() {
+ TraceHelper.partitionSection("TouchInt", "Launcher On resume");
mDragView.getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() {
@Override
public boolean onPreDraw() {
mDragView.getViewTreeObserver().removeOnPreDrawListener(this);
mStateCallback.setState(STATE_LAUNCHER_READY);
+ TraceHelper.partitionSection("TouchInt", "Launcher drawn");
return true;
}
});
@@ -179,6 +182,7 @@ public class NavBarSwipeInteractionHandler extends InternalStateHandler {
// Optimization
mLauncher.getAppsView().setVisibility(View.GONE);
mRecentsView.setVisibility(View.GONE);
+ TraceHelper.partitionSection("TouchInt", "Launcher on new intent");
}
@UiThread
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index ff26fb39c..55fd448ae 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -132,6 +132,7 @@ public class TouchInteractionService extends Service {
}
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN: {
+ TraceHelper.beginSection("TouchInt");
mActivePointerId = ev.getPointerId(0);
mDownPos.set(ev.getX(), ev.getY());
mLastPos.set(mDownPos);
@@ -194,6 +195,7 @@ public class TouchInteractionService extends Service {
case MotionEvent.ACTION_CANCEL:
// TODO: Should be different than ACTION_UP
case MotionEvent.ACTION_UP: {
+ TraceHelper.endSection("TouchInt");
endInteraction();
break;
@@ -210,6 +212,7 @@ public class TouchInteractionService extends Service {
final Context context = this;
final RecentsTaskLoadPlan loadPlan = new RecentsTaskLoadPlan(context);
final int taskId = mRunningTask.id;
+ TraceHelper.partitionSection("TouchInt", "Thershold crossed ");
BackgroundExecutor.get().submit(() -> {
// Get the snap shot before
@@ -218,6 +221,7 @@ public class TouchInteractionService extends Service {
// Start the launcher activity with our custom handler
Intent homeIntent = handler.addToIntent(new Intent(mHomeIntent));
startActivity(homeIntent, ActivityOptions.makeCustomAnimation(this, 0, 0).toBundle());
+ TraceHelper.partitionSection("TouchInt", "Home started");
/*
ActivityManagerWrapper.getInstance().startRecentsActivity(null, options,