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

Commit 457fa2cb authored by Maryam Karimzadehgan's avatar Maryam Karimzadehgan Committed by Android (Google) Code Review
Browse files

Merge "Add package_name to log for debugging the back gesture model."

parents edc80233 601b39f9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3192,8 +3192,9 @@ message BackGesture {
    optional int32 end_y = 7;  // Y coordinate for ACTION_MOVE event.
    optional int32 left_boundary = 8;  // left edge width + left inset
    optional int32 right_boundary = 9;  // screen width - (right edge width + right inset)
    optional float ml_model_score = 10;  // The score between 0 and 1 which is the prediction output
        // for the Back Gesture model.
    // The score between 0 and 1 which is the prediction output for the Back Gesture model.
    optional float ml_model_score = 10;
    optional string package_name = 11;  // The name of the top 100 most used package by all users.

    enum WindowHorizontalLocation {
        DEFAULT_LOCATION = 0;
+6 −1
Original line number Diff line number Diff line
@@ -605,6 +605,11 @@ public class EdgeBackGestureHandler extends CurrentUserTracker implements Displa
            return;
        }
        mLogGesture = false;
        String logPackageName = "";
        // Due to privacy, only top 100 most used apps by all users can be logged.
        if (mUseMLModel && mVocab.containsKey(mPackageName) && mVocab.get(mPackageName) < 100) {
            logPackageName = mPackageName;
        }
        SysUiStatsLog.write(SysUiStatsLog.BACK_GESTURE_REPORTED_REPORTED, backType,
                (int) mDownPoint.y, mIsOnLeftEdge
                        ? SysUiStatsLog.BACK_GESTURE__X_LOCATION__LEFT
@@ -613,7 +618,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker implements Displa
                (int) mEndPoint.x, (int) mEndPoint.y,
                mEdgeWidthLeft + mLeftInset,
                mDisplaySize.x - (mEdgeWidthRight + mRightInset),
                mUseMLModel ? mMLResults : -2);
                mUseMLModel ? mMLResults : -2, logPackageName);
    }

    private void onMotionEvent(MotionEvent ev) {