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

Commit 8e735c82 authored by Tony Wickham's avatar Tony Wickham
Browse files

Add some gesture logs

- Log when a DelegateInputConsumer becomes active
- Add reason for NavHandleLongPressInputConsumer
- Fixed typo

Test: adb shell dumpsys activity service TouchInteractionService
locally and verify logs
Flag: ENABLE_LONG_PRESS_NAV_HANDLE
Bug: 300247322

Change-Id: Ie2cdc8f4bfc8a6c794536871e714ff913f36f46f
parent 2cd2e2da
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -918,6 +918,11 @@ public class TouchInteractionService extends Service {
                }
            } else if (canStartSystemGesture && FeatureFlags.ENABLE_LONG_PRESS_NAV_HANDLE.get()
                    && !previousGestureState.isRecentsAnimationRunning()) {
                reasonString.append(NEWLINE_PREFIX)
                        .append(reasonPrefix)
                        .append(SUBSTRING_PREFIX)
                        .append("Long press nav handle enabled, "
                                + "using NavHandleLongPressInputConsumer");
                base = new NavHandleLongPressInputConsumer(this, base, mInputMonitorCompat);
            }

+5 −0
Original line number Diff line number Diff line
@@ -152,4 +152,9 @@ public class AccessibilityInputConsumer extends DelegateInputConsumer {
            mDelegate.onMotionEvent(ev);
        }
    }

    @Override
    protected String getDelegatorName() {
        return "AccessibilityInputConsumer";
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -278,4 +278,9 @@ public class AssistantInputConsumer extends DelegateInputConsumer {
            return true;
        }
    }

    @Override
    protected String getDelegatorName() {
        return "AssistantInputConsumer";
    }
}
+9 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import android.view.MotionEvent;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.quickstep.InputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.systemui.shared.system.InputMonitorCompat;

public abstract class DelegateInputConsumer implements InputConsumer {
@@ -42,7 +43,15 @@ public abstract class DelegateInputConsumer implements InputConsumer {
        mDelegate.onConsumerAboutToBeSwitched();
    }

    /**
     * Returns the name of this DelegateInputConsumer.
     */
    protected abstract String getDelegatorName();

    protected void setActive(MotionEvent ev) {
        ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString(getDelegatorName())
                .append(" became active"));

        mState = STATE_ACTIVE;
        TestLogging.recordEvent(TestProtocol.SEQUENCE_PILFER, "pilferPointers");
        mInputMonitor.pilferPointers();
+5 −0
Original line number Diff line number Diff line
@@ -78,4 +78,9 @@ public class NavHandleLongPressInputConsumer extends DelegateInputConsumer {

        return distFromMiddle < areaFromMiddle;
    }

    @Override
    protected String getDelegatorName() {
        return "NavHandleLongPressInputConsumer";
    }
}
Loading