Merge \\"Logging tron metrics for ambient display gestures\\" into nyc-mr1-dev am: acc8944582

am: 77f3612ed2

Change-Id: Ie7ec8e79d36a5074e3a55f43d7d77c7025751b4e
This commit is contained in:
Bhavik Singh
2016-06-09 03:13:53 +00:00
committed by android-build-merger
2 changed files with 12 additions and 0 deletions

View File

@@ -39,6 +39,8 @@ import android.service.dreams.DreamService;
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 @@ public class DozeService extends DreamService {
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);

View File

@@ -2219,6 +2219,12 @@ message MetricsEvent {
// 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 -----