Loading quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } }); Loading @@ -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 Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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 Loading @@ -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, Loading src/com/android/launcher3/util/TraceHelper.java +2 −3 Original line number Diff line number Diff line Loading @@ -33,9 +33,8 @@ public class TraceHelper { private static final boolean ENABLED = FeatureFlags.IS_DOGFOOD_BUILD; private static final boolean SYSTEM_TRACE = true; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<String, MutableLong>() : null; private static final boolean SYSTEM_TRACE = false; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null; public static void beginSection(String sectionName) { if (ENABLED) { Loading Loading
quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } }); Loading @@ -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 Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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 Loading @@ -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, Loading
src/com/android/launcher3/util/TraceHelper.java +2 −3 Original line number Diff line number Diff line Loading @@ -33,9 +33,8 @@ public class TraceHelper { private static final boolean ENABLED = FeatureFlags.IS_DOGFOOD_BUILD; private static final boolean SYSTEM_TRACE = true; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<String, MutableLong>() : null; private static final boolean SYSTEM_TRACE = false; private static final ArrayMap<String, MutableLong> sUpTimes = ENABLED ? new ArrayMap<>() : null; public static void beginSection(String sectionName) { if (ENABLED) { Loading