diff options
4 files changed, 28 insertions, 3 deletions
diff --git a/core/java/com/android/internal/logging/MetricsLogger.java b/core/java/com/android/internal/logging/MetricsLogger.java index cc677cc60acb..e276bc62ab09 100644 --- a/core/java/com/android/internal/logging/MetricsLogger.java +++ b/core/java/com/android/internal/logging/MetricsLogger.java @@ -36,6 +36,24 @@ public class MetricsLogger implements MetricsConstants { public static final int NOTIFICATION_TOPIC_NOTIFICATION = 263; public static final int ACTION_DEFAULT_SMS_APP_CHANGED = 264; + /** + * Logged when the user docks a window from recents by longpressing a task and dragging it to + * the dock area. + */ + public static final int ACTION_WINDOW_DOCK_DRAG_DROP = 265; + + /** + * Logged when the user docks a fullscreen window by long pressing recents which also opens + * recents on the lower/right side. + */ + public static final int ACTION_WINDOW_DOCK_LONGPRESS = 266; + + /** + * Logged when the user docks a window by dragging from the navbar which also opens recents on + * the lower/right side. + */ + public static final int ACTION_WINDOW_DOCK_SWIPE = 267; + public static void visible(Context context, int category) throws IllegalArgumentException { if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) { throw new IllegalArgumentException("Must define metric category"); 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 55a54a2a2bd2..36acc28d1d73 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -16,8 +16,6 @@ package com.android.systemui.recents.views; -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; @@ -29,12 +27,13 @@ import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; -import android.view.ViewConfiguration; import android.view.ViewPropertyAnimator; import android.view.WindowInsets; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; import android.widget.FrameLayout; + +import com.android.internal.logging.MetricsLogger; import com.android.systemui.R; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsActivity; @@ -513,6 +512,9 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV SystemServicesProxy ssp = Recents.getSystemServices(); ssp.startTaskInDockedMode(event.task.key.id, dockState.createMode); launchTask(event.task, null, INVALID_STACK_ID); + + MetricsLogger.action(mContext, + MetricsLogger.ACTION_WINDOW_DOCK_DRAG_DROP); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java index d35e57b10c51..a7ed505a6750 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java @@ -25,6 +25,7 @@ import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.ViewConfiguration; +import com.android.internal.logging.MetricsLogger; import com.android.systemui.R; import com.android.systemui.RecentsComponent; import com.android.systemui.stackdivider.Divider; @@ -193,6 +194,8 @@ public class NavigationBarGestureHelper extends GestureDetector.SimpleOnGestureL mDivider.getView().startDragging(); } mDockWindowTouchSlopExceeded = true; + MetricsLogger.action(mContext, + MetricsLogger.ACTION_WINDOW_DOCK_SWIPE); return true; } } else { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index b854c80065b3..76b8223ba778 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1136,6 +1136,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mRecents.dockTopTask(false /* draggingInRecents */, ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT, null /* initialBounds */); + MetricsLogger.action(mContext, + MetricsLogger.ACTION_WINDOW_DOCK_LONGPRESS); return true; } return false; |