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

Commit 999d7d9c authored by Julia Tuttle's avatar Julia Tuttle Committed by Android (Google) Code Review
Browse files

Merge "FalsingCollector: Log event action names, not numbers" into main

parents 1f2de000 f178bd1e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -292,6 +292,7 @@ class FalsingCollectorImpl implements FalsingCollector {

    @Override
    public void onKeyEvent(KeyEvent ev) {
        logDebug("REAL: onKeyEvent(" + KeyEvent.actionToString(ev.getAction()) + ")");
        // Only collect if it is an ACTION_UP action and is allow-listed
        if (ev.getAction() == KeyEvent.ACTION_UP && mAcceptedKeycodes.contains(ev.getKeyCode())) {
            mFalsingDataProvider.onKeyEvent(ev);
@@ -300,7 +301,7 @@ class FalsingCollectorImpl implements FalsingCollector {

    @Override
    public void onTouchEvent(MotionEvent ev) {
        logDebug("REAL: onTouchEvent(" + ev.getActionMasked() + ")");
        logDebug("REAL: onTouchEvent(" + MotionEvent.actionToString(ev.getActionMasked()) + ")");
        if (!mKeyguardStateController.isShowing()) {
            avoidGesture();
            return;
+2 −2
Original line number Diff line number Diff line
@@ -61,11 +61,11 @@ class FalsingCollectorNoOp @Inject constructor() : FalsingCollector {
    }

    override fun onKeyEvent(ev: KeyEvent) {
        logDebug("NOOP: onKeyEvent(${ev.action}")
        logDebug("NOOP: onKeyEvent(${KeyEvent.actionToString(ev.action)}")
    }

    override fun onTouchEvent(ev: MotionEvent) {
        logDebug("NOOP: onTouchEvent(${ev.actionMasked})")
        logDebug("NOOP: onTouchEvent(${MotionEvent.actionToString(ev.actionMasked)})")
    }

    override fun onMotionEventComplete() {