Logging tron metrics for ambient display gestures
Introducing new TRON metric (ACTION_AMBIENT_GESTURE)
and implementing logging for metric in DozeService.java
BUG=27907309
Change-Id: I324b6ef65e251f62b277beb1cb76af25159dbd90
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index 3370091..5f1b042 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -39,6 +39,8 @@
import android.util.Log;
import android.view.Display;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.systemui.SystemUIApplication;
import com.android.systemui.statusbar.phone.DozeParameters;
import com.android.systemui.statusbar.phone.DozeParameters.PulseSchedule;
@@ -538,6 +540,10 @@
mWakeLock.acquire();
try {
if (DEBUG) Log.d(mTag, "onTrigger: " + triggerEventToString(event));
+ if (mSensor.getType() == Sensor.TYPE_PICK_UP_GESTURE) {
+ int subType = (int) event.values[0];
+ MetricsLogger.action(mContext, MetricsEvent.ACTION_AMBIENT_GESTURE, subType);
+ }
if (mDebugVibrate) {
final Vibrator v = (Vibrator) mContext.getSystemService(
Context.VIBRATOR_SERVICE);
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 1dcb13c..2a506d82 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -2219,6 +2219,12 @@
// Notification group expansion state toggled by the expand gesture.
ACTION_NOTIFICATION_GROUP_GESTURE_EXPANDER = 410;
+ // User performs gesture that activates the ambient display
+ // 1: Gesture performed is Nudge
+ // 2: Gesture performed is Pickup
+ // 4: Gesture performed is Double Tap
+ ACTION_AMBIENT_GESTURE = 411;
+
// ---- End N Constants, all N constants go above this line ----
// ------- Begin N App Disambig Shade -----