summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents/views
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/views')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java4
4 files changed, 28 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 6cb11b1..947c19c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -37,6 +37,7 @@ import android.view.WindowInsets;
import android.view.WindowManagerGlobal;
import android.widget.FrameLayout;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsAppWidgetHostView;
@@ -589,11 +590,22 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
if (mCb != null) {
mCb.onTaskLaunchFailed();
}
+
+ // Keep track of failed launches
+ MetricsLogger.count(getContext(), "overview_task_launch_failed", 1);
}
}
}
};
+ // Keep track of the index of the task launch
+ int taskIndexFromFront = 0;
+ int taskIndex = stack.indexOfTask(task);
+ if (taskIndex > -1) {
+ taskIndexFromFront = stack.getTaskCount() - taskIndex - 1;
+ }
+ MetricsLogger.histogram(getContext(), "overview_task_launch_index", taskIndexFromFront);
+
// Launch the app right away if there is no task view, otherwise, animate the icon out first
if (tv == null) {
launchRunnable.run();
@@ -644,6 +656,9 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
}
mCb.onAllTaskViewsDismissed();
+
+ // Keep track of all-deletions
+ MetricsLogger.count(getContext(), "overview_task_all_dismissed", 1);
}
/** Final callback after Recents is finally hidden. */
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index ebfc796..abdebf3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -29,6 +29,8 @@ import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.FrameLayout;
+
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
@@ -1361,6 +1363,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
public void onTaskViewAppInfoClicked(TaskView tv) {
if (mCb != null) {
mCb.onTaskViewAppInfoClicked(tv.getTask());
+
+ // Keep track of app-info invocations
+ MetricsLogger.count(getContext(), "overview_app_info", 1);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
index 13bdbd2..78b3512 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
@@ -23,6 +23,7 @@ import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewParent;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsConfiguration;
@@ -452,6 +453,9 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
tv.setTouchEnabled(true);
// Remove the task view from the stack
mSv.onTaskViewDismissed(tv);
+ // Keep track of deletions by keyboard
+ MetricsLogger.histogram(tv.getContext(), "overview_task_dismissed_source",
+ Constants.Metrics.DismissSourceSwipeGesture);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 5906ef1..cbfe842 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -27,6 +27,7 @@ import android.view.View;
import android.view.ViewOutlineProvider;
import android.view.animation.AccelerateInterpolator;
import android.widget.FrameLayout;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
@@ -741,6 +742,9 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
}
} else if (v == mHeaderView.mDismissButton) {
dismissTask();
+ // Keep track of deletions by the dismiss button
+ MetricsLogger.histogram(getContext(), "overview_task_dismissed_source",
+ Constants.Metrics.DismissSourceHeaderButton);
} else if (v == mHeaderView.mMoveTaskButton) {
if (mCb != null) {
mCb.onTaskResize(tv);