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

Commit f178bd1e authored by Julia Tuttle's avatar Julia Tuttle
Browse files

FalsingCollector: Log event action names, not numbers

Bug: 330492016
Test: manual: `adb shell setprop log.tag.FalsingCollector verbose`, `adb shell stop && adb shell start`, `adb logcat -s FalsingCollector`, go to lockscreen, tap things
Flag: NA
Change-Id: Ia30c810007d34ae604c4c55b1b7cfbedcbf71956
parent f7578688
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() {