Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acc89445 authored by Bhavik Singh's avatar Bhavik Singh Committed by Android (Google) Code Review
Browse files

Merge "Logging tron metrics for ambient display gestures" into nyc-mr1-dev

parents 7f760d86 3451da4a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
+6 −0
Original line number Diff line number Diff line
@@ -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 -----