summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
diff options
context:
space:
mode:
authorVinit Nayak <peanutbutter@google.com>2019-08-26 14:18:51 -0700
committerVinit Nayak <peanutbutter@google.com>2019-08-26 15:10:21 -0700
commit9b26e63f9051e5059921e265e62e1dbb083b5840 (patch)
tree3033b09936dca9f16fea5ef7ffbf5bb13df8f4ad /quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
parent2345e6cdc6aad5c5e6bc5caf810873e89405822f (diff)
downloadandroid_packages_apps_Trebuchet-9b26e63f9051e5059921e265e62e1dbb083b5840.tar.gz
android_packages_apps_Trebuchet-9b26e63f9051e5059921e265e62e1dbb083b5840.tar.bz2
android_packages_apps_Trebuchet-9b26e63f9051e5059921e265e62e1dbb083b5840.zip
Add unique id to trace logs through recents animations
Generate a 3 digit number and append it to log statements here as well as in platform. fixes: 134619041 Test: Inspected log output with adb shell dumpsys activity service TouchInteractionService Change-Id: I52a76dd2950565b246384d7766fdede9e28f5bb9
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java27
1 files changed, 19 insertions, 8 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
index 440e8b9fc..716e8f4c6 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -16,7 +16,6 @@
package com.android.quickstep;
import static android.view.MotionEvent.ACTION_DOWN;
-
import static com.android.launcher3.config.FeatureFlags.ADAPTIVE_ICON_WINDOW_ANIM;
import static com.android.launcher3.config.FeatureFlags.APPLY_CONFIG_AT_RUNTIME;
import static com.android.launcher3.config.FeatureFlags.ENABLE_HINTS_IN_OVERVIEW;
@@ -68,11 +67,9 @@ import android.view.InputEvent;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.WindowManager;
-
import androidx.annotation.BinderThread;
import androidx.annotation.UiThread;
import androidx.annotation.WorkerThread;
-
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
import com.android.launcher3.ResourceUtils;
@@ -137,6 +134,13 @@ class ArgList extends LinkedList<String> {
public class TouchInteractionService extends Service implements
NavigationModeChangeListener, DisplayListener {
+ /**
+ * NOTE: This value should be kept same as
+ * ActivityTaskManagerService#INTENT_EXTRA_LOG_TRACE_ID in platform
+ */
+ public static final String INTENT_EXTRA_LOG_TRACE_ID = "INTENT_EXTRA_LOG_TRACE_ID";
+
+
public static final EventLogArray TOUCH_INTERACTION_LOG =
new EventLogArray("touch_interaction_log", 40);
@@ -239,6 +243,7 @@ public class TouchInteractionService extends Service implements
private static boolean sConnected = false;
private static boolean sIsInitialized = false;
private static final SwipeSharedState sSwipeSharedState = new SwipeSharedState();
+ private int mLogId;
public static boolean isConnected() {
return sConnected;
@@ -549,9 +554,12 @@ public class TouchInteractionService extends Service implements
Log.e(TAG, "Unknown event " + ev);
return;
}
+
MotionEvent event = (MotionEvent) ev;
- TOUCH_INTERACTION_LOG.addLog("onMotionEvent", event.getActionMasked());
if (event.getAction() == ACTION_DOWN) {
+ mLogId = TOUCH_INTERACTION_LOG.generateAndSetLogId();
+ sSwipeSharedState.setLogTraceId(mLogId);
+
if (mSwipeTouchRegion.contains(event.getX(), event.getY())) {
boolean useSharedState = mConsumer.useSharedSwipeState();
mConsumer.onConsumerAboutToBeSwitched();
@@ -571,6 +579,8 @@ public class TouchInteractionService extends Service implements
mUncheckedConsumer = InputConsumer.NO_OP;
}
}
+
+ TOUCH_INTERACTION_LOG.addLog("onMotionEvent", event.getActionMasked());
mUncheckedConsumer.onMotionEvent(event);
}
@@ -656,7 +666,7 @@ public class TouchInteractionService extends Service implements
final ComponentName homeComponent =
mOverviewComponentObserver.getHomeIntent().getComponent();
forceOverviewInputConsumer =
- runningTaskInfo.baseIntent.getComponent().equals(homeComponent);
+ runningTaskInfo.baseIntent.getComponent(). equals(homeComponent);
}
}
@@ -713,13 +723,13 @@ public class TouchInteractionService extends Service implements
return new OtherActivityInputConsumer(this, runningTaskInfo,
shouldDefer, mOverviewCallbacks, this::onConsumerInactive,
sSwipeSharedState, mInputMonitorCompat, mSwipeTouchRegion,
- disableHorizontalSwipe(event), factory);
+ disableHorizontalSwipe(event), factory, mLogId);
}
private InputConsumer createDeviceLockedInputConsumer(RunningTaskInfo taskInfo) {
if (mMode == Mode.NO_BUTTON && taskInfo != null) {
return new DeviceLockedInputConsumer(this, sSwipeSharedState, mInputMonitorCompat,
- mSwipeTouchRegion, taskInfo.taskId);
+ mSwipeTouchRegion, taskInfo.taskId, mLogId);
} else {
return mResetGestureInputConsumer;
}
@@ -783,7 +793,8 @@ public class TouchInteractionService extends Service implements
}
// Pass null animation handler to indicate this start is preload.
- startRecentsActivityAsync(mOverviewComponentObserver.getOverviewIntentIgnoreSysUiState(), null);
+ startRecentsActivityAsync(mOverviewComponentObserver.getOverviewIntentIgnoreSysUiState(),
+ null);
}
@Override