mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Merge "Add some gesture logs" into udc-qpr-dev
This commit is contained in:
@@ -893,7 +893,7 @@ public class TouchInteractionService extends Service {
|
||||
}
|
||||
if (mDeviceState.isFullyGesturalNavMode() || newGestureState.isTrackpadGesture()) {
|
||||
String reasonPrefix = "device is in gesture navigation mode or 3-button mode with a"
|
||||
+ "trackpad gesture";
|
||||
+ " trackpad gesture";
|
||||
if (mDeviceState.canTriggerAssistantAction(event)) {
|
||||
reasonString.append(NEWLINE_PREFIX)
|
||||
.append(reasonPrefix)
|
||||
@@ -921,6 +921,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,4 +152,9 @@ public class AccessibilityInputConsumer extends DelegateInputConsumer {
|
||||
mDelegate.onMotionEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "AccessibilityInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,4 +278,9 @@ public class AssistantInputConsumer extends DelegateInputConsumer {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "AssistantInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -80,4 +80,9 @@ public class NavHandleLongPressInputConsumer extends DelegateInputConsumer {
|
||||
|
||||
return distFromMiddle < areaFromMiddle;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "NavHandleLongPressInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,4 +175,9 @@ public class OneHandedModeInputConsumer extends DelegateInputConsumer {
|
||||
final float angle = (float) Math.toDegrees(Math.atan2(deltaY, deltaX));
|
||||
return angle > ANGLE_MIN && angle < ANGLE_MAX;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "OneHandedModeInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,4 +346,9 @@ public class TaskbarUnstashInputConsumer extends DelegateInputConsumer {
|
||||
private boolean isMouseEvent(MotionEvent event) {
|
||||
return event.getSource() == InputDevice.SOURCE_MOUSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "TaskbarUnstashInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,4 +82,9 @@ public class TrackpadStatusBarInputConsumer extends DelegateInputConsumer {
|
||||
mSystemUiProxy.onStatusBarTrackpadEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDelegatorName() {
|
||||
return "TrackpadStatusBarInputConsumer";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user