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

Commit 3451da4a authored by Bhavik Singh's avatar Bhavik Singh
Browse files

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
parent cc120646
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 -----